angular10

Errors after npm audit fix angular 10.0.1

人盡茶涼 提交于 2021-02-05 02:05:03
问题 I ran this older 10.0.1 angular project today, and it told me it had a lot of low vulnerabilities and a few high ones. so i ran npm audit fix to fix them. but now when I try to run it, it gives me these errors: Error: ./src/main.ts Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): TypeError: angularCompiler.getResourceDependencies(...) is not a function or its return value is not iterable at getDependencies (C:\Web\vgc\vgc\node_modules\@ngtools\webpack\src\ivy

Errors after npm audit fix angular 10.0.1

情到浓时终转凉″ 提交于 2021-02-05 02:03:41
问题 I ran this older 10.0.1 angular project today, and it told me it had a lot of low vulnerabilities and a few high ones. so i ran npm audit fix to fix them. but now when I try to run it, it gives me these errors: Error: ./src/main.ts Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): TypeError: angularCompiler.getResourceDependencies(...) is not a function or its return value is not iterable at getDependencies (C:\Web\vgc\vgc\node_modules\@ngtools\webpack\src\ivy

Remove previous mat-dialog's CSS from DOM

寵の児 提交于 2021-01-29 15:22:33
问题 I use two mat-dialog components in my application, and both have custom styles for cdk-global-overlay-wrapper. The problem here is, even after the first dialog is closed, its CSS still remains in scope, i.e., within the DOM. Hence, the style for cdk-global-overlay-wrapper from the second dialog gets overridden by the first one. Please suggest a possible solution. component1.css ::ng-deep .cdk-global-overlay-wrapper { pointer-events: none !important; } component2.css ::ng-deep .cdk-global

The angular material dialog is not working in production build

我与影子孤独终老i 提交于 2021-01-29 08:09:59
问题 I am using angular 10 and angular material 10. the angular material dialogue is not working in the production build ( ng serve --prod and ng build --prod ) but It is working fine local dev environment ( ng serve ) I have already added the component in the entryComponents and bootstrap It is not throwing any kind of error in the console. what I can see is the card is loaded and no components inside the dialog are available, You can see the below screenshot, which is loading the card but not

Class is not an Angular module for external library

做~自己de王妃 提交于 2021-01-07 03:53:59
问题 I have created a simple Angular app and added a custom library (same project): ng new my-library ng generate library my-library-lib Then to test this simple library in a different project, I built the lib: ng build my-library-lib I linked the lib in dist folder and linked it to a different project and imported the MyLibraryLibModule in my SharedModule { MyLibraryLibModule } from 'my-library-lib imports: [..., MyLibraryLibModule] --> throws error: class is not an Angular Module This is a

Class is not an Angular module for external library

我是研究僧i 提交于 2021-01-07 03:53:04
问题 I have created a simple Angular app and added a custom library (same project): ng new my-library ng generate library my-library-lib Then to test this simple library in a different project, I built the lib: ng build my-library-lib I linked the lib in dist folder and linked it to a different project and imported the MyLibraryLibModule in my SharedModule { MyLibraryLibModule } from 'my-library-lib imports: [..., MyLibraryLibModule] --> throws error: class is not an Angular Module This is a

couldnt import fireStoreModule correctly in angular

[亡魂溺海] 提交于 2020-12-27 06:35:14
问题 I am getting this error while running the angular project This likely means that the library (@angular/fire/firestore) which declares AngularFirestore has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of theen processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be

Angular Date Pipe Not Working Correctly in Textbox

白昼怎懂夜的黑 提交于 2020-12-26 10:40:40
问题 My Date Pipe is not working in Angular. I only want to show as this format MM/dd/yyyy'. How can it be fixed? Typescript: this.testDate = new Date(this.singleUser.createDate); console.log(this.testDate); this.userForm = new FormGroup({ userName: new FormControl(this.singleUser.userName), email: new FormControl(this.singleUser.email), createDate: new FormControl(this.singleUser.createDate) }); Console Log: Wed Jul 22 2020 17:18:24 GMT-0700 (Pacific Daylight Time) HTML: <mat-form-field class=

Angular Date Pipe Not Working Correctly in Textbox

大憨熊 提交于 2020-12-26 10:40:36
问题 My Date Pipe is not working in Angular. I only want to show as this format MM/dd/yyyy'. How can it be fixed? Typescript: this.testDate = new Date(this.singleUser.createDate); console.log(this.testDate); this.userForm = new FormGroup({ userName: new FormControl(this.singleUser.userName), email: new FormControl(this.singleUser.email), createDate: new FormControl(this.singleUser.createDate) }); Console Log: Wed Jul 22 2020 17:18:24 GMT-0700 (Pacific Daylight Time) HTML: <mat-form-field class=

Angular 10, TypeError in browser console, but no error in build

假如想象 提交于 2020-12-14 23:52:50
问题 No code changes done, upgraded to Angular 10, everything works except a feature. There were no build errors, but in browser console able to see below error. I guess this may be related to angular.core, rxjs, but unclear..appreciate your help. core.js:4197 ERROR TypeError: templateRef.createEmbeddedView is not a function at ViewContainerRef.createEmbeddedView (core.js:10092) at NgTemplateOutlet.ngOnChanges (ng_template_outlet.ts:65) at NgTemplateOutlet