angular9

How to access _factories property from ComponentFactoryResolver in Angular9 which was available in Angular7?

独自空忆成欢 提交于 2021-01-28 21:46:09
问题 I used ComponentFactoryResolver to access all the entry component factories and then add routes of those components dynamically in Angular 7. constructor(private componentFactoryResolver: ComponentFactoryResolver) { } var factories = this.componentFactoryResolver['_factories'] let route: Route = { path: MyPath, component: factories[0].factory[1].componentType }; this.router.resetConfig(config); I updated my project to Angular 9 and now _factories are not available in ComponentFactoryResolver.

Why does usage of primeng p-radiobutton cause native Element error in Angular 9?

走远了吗. 提交于 2021-01-07 01:29:17
问题 I have a project which I have recently migrated to Angular 9 from Angular 8 . The project uses primeng version : 4.3.0 . Now the p-radiobutton tag is widely used through out the project to display radio buttons and it is not working properly . The p-radiobutton tag gives the runtime error : Unable to get property 'nativeElement' of undefined or null reference due to which , the UI gets distorted . The entire error stack trace is depicted down below : TypeError: Unable to get property

Why does usage of primeng p-radiobutton cause native Element error in Angular 9?

那年仲夏 提交于 2021-01-07 01:27:26
问题 I have a project which I have recently migrated to Angular 9 from Angular 8 . The project uses primeng version : 4.3.0 . Now the p-radiobutton tag is widely used through out the project to display radio buttons and it is not working properly . The p-radiobutton tag gives the runtime error : Unable to get property 'nativeElement' of undefined or null reference due to which , the UI gets distorted . The entire error stack trace is depicted down below : TypeError: Unable to get property

How to import all Angular Material modules in Angular 9

梦想与她 提交于 2021-01-02 07:51:57
问题 I want to import all angular material modules and use into overall angular project templates. 回答1: We can create a new module and import all material modules in the new module and use into our templates. Please use this command and run into Angular CLI: ng g m material --module=app --module=app - this command will automatically import newly created MaterialModule module and add into AppModule imports[] array. Now open MaterialModule file and Ctrl + C / Ctrl + P : import { NgModule } from '

How to import all Angular Material modules in Angular 9

狂风中的少年 提交于 2021-01-02 07:50:03
问题 I want to import all angular material modules and use into overall angular project templates. 回答1: We can create a new module and import all material modules in the new module and use into our templates. Please use this command and run into Angular CLI: ng g m material --module=app --module=app - this command will automatically import newly created MaterialModule module and add into AppModule imports[] array. Now open MaterialModule file and Ctrl + C / Ctrl + P : import { NgModule } from '

Unable to resolve dependency tree error when installing npm packages

别来无恙 提交于 2020-12-29 03:45:13
问题 When trying to install the npm packages using npm i command I am getting the following exception: I have tried reinstalling the node js package and setting proxy to off using: set HTTP_PROXY= set HTTPS_PROXY= The issue is still there. What I am doing wrong? Update: When I run the following command: npm install --legacy-peer-deps The following error is displayed: 回答1: This is not related to http proxy. You have dependency conflict ( incorrect and potentially broken dependency) as it says, So

Mat paginator items per page not working in angular 9

大城市里の小女人 提交于 2020-12-27 04:45:02
问题 I'm rendering the table data from an observable and then assigning the datasource to the paginator. The next page arrows are working, as well as the first page and last page buttons. When I'm trying to change the items per page, it is not working. I tried ngAfterViewInit and page event calling and they did'nt make any difference. import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core'; import { DataserviceService } from 'src/app/dataservice.service'; import { DataProvider

Mat paginator items per page not working in angular 9

拥有回忆 提交于 2020-12-27 04:43:59
问题 I'm rendering the table data from an observable and then assigning the datasource to the paginator. The next page arrows are working, as well as the first page and last page buttons. When I'm trying to change the items per page, it is not working. I tried ngAfterViewInit and page event calling and they did'nt make any difference. import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core'; import { DataserviceService } from 'src/app/dataservice.service'; import { DataProvider

Quill Editor : Check for change in content in Angular?

落花浮王杯 提交于 2020-12-15 05:24:17
问题 I have implemented quill editor in Angular by creating new instance of quill and creating custom toolbar. this.quill = new Quill('#editor-container', { modules: { toolbar: '#toolbar-container' }, theme: 'snow' // or 'bubble' }); I have a "update" button which would call the update API. I need to check if the contents of the Quill editor has changed. I am aware of quill.on('text-change'): this.quill.on('text-change', function(delta, oldDelta, source) { if (source == 'api') { console.log('An