angular-cli

How to edit your service worker file for an Angular CLI project

帅比萌擦擦* 提交于 2020-12-15 05:32:41
问题 I have added the @angular/pwa package to my Angular CLI project with the command ng add @angular/pwa --project *project-name* so it becomes a progressive web applicaiton, and this adds a service worker I know. I want to edit that default service worker to support e.g. handling Shared Targets links. I see that the service worker is registered to a file calleded ngsw-worker.js using the "Inspect" option in Google Chrome. How can I edit that service worker ( ngsw-worker.js ) created by the

Angular 11: Production build Error: Expected a pseudo-class or pseudo-element

给你一囗甜甜゛ 提交于 2020-12-15 05:32:26
问题 Recently upgraded from Angular 6 to Angular 11 using https://update.angular.io. Everything went smooth and Angular runs locally using ng serve but when trying to build a production-build using ng serve --prod it gives just following error: Error: Expected a pseudo-class or pseudo-element. When using ng build --prod --verbose=true , it results in lot of logs similar to: WARNING in Conflict: Multiple assets emit different content to the same filename 3rdpartylicenses.txt WARNING in Conflict:

Angular 11: Production build Error: Expected a pseudo-class or pseudo-element

此生再无相见时 提交于 2020-12-15 05:32:20
问题 Recently upgraded from Angular 6 to Angular 11 using https://update.angular.io. Everything went smooth and Angular runs locally using ng serve but when trying to build a production-build using ng serve --prod it gives just following error: Error: Expected a pseudo-class or pseudo-element. When using ng build --prod --verbose=true , it results in lot of logs similar to: WARNING in Conflict: Multiple assets emit different content to the same filename 3rdpartylicenses.txt WARNING in Conflict:

Angular 11: Production build Error: Expected a pseudo-class or pseudo-element

偶尔善良 提交于 2020-12-15 05:32:02
问题 Recently upgraded from Angular 6 to Angular 11 using https://update.angular.io. Everything went smooth and Angular runs locally using ng serve but when trying to build a production-build using ng serve --prod it gives just following error: Error: Expected a pseudo-class or pseudo-element. When using ng build --prod --verbose=true , it results in lot of logs similar to: WARNING in Conflict: Multiple assets emit different content to the same filename 3rdpartylicenses.txt WARNING in Conflict:

How to exclude all files under a directory in lint using angular CLI?

廉价感情. 提交于 2020-12-13 04:12:28
问题 We can exclude node_modules in this way. "lint": [ { "project": "src/main/webapp/app/file.json", "exclude": "**/node_modules/**" } ] But how to exclude all files under a directory? I tried below way. It is not working "exclude": [ "**/*whatever.pipe.ts", "**/*whatever_else.component.ts" ] So this is my current path for the directory "src/main/assets/js/ngx-typeahead" I have to exclude all the files under this directory from linting. How can i achieve that? Any suggestions would be appreciated

How to exclude all files under a directory in lint using angular CLI?

喜夏-厌秋 提交于 2020-12-13 04:11:36
问题 We can exclude node_modules in this way. "lint": [ { "project": "src/main/webapp/app/file.json", "exclude": "**/node_modules/**" } ] But how to exclude all files under a directory? I tried below way. It is not working "exclude": [ "**/*whatever.pipe.ts", "**/*whatever_else.component.ts" ] So this is my current path for the directory "src/main/assets/js/ngx-typeahead" I have to exclude all the files under this directory from linting. How can i achieve that? Any suggestions would be appreciated

How to exclude all files under a directory in lint using angular CLI?

落花浮王杯 提交于 2020-12-13 04:10:27
问题 We can exclude node_modules in this way. "lint": [ { "project": "src/main/webapp/app/file.json", "exclude": "**/node_modules/**" } ] But how to exclude all files under a directory? I tried below way. It is not working "exclude": [ "**/*whatever.pipe.ts", "**/*whatever_else.component.ts" ] So this is my current path for the directory "src/main/assets/js/ngx-typeahead" I have to exclude all the files under this directory from linting. How can i achieve that? Any suggestions would be appreciated

How to exclude all files under a directory in lint using angular CLI?

混江龙づ霸主 提交于 2020-12-13 04:10:15
问题 We can exclude node_modules in this way. "lint": [ { "project": "src/main/webapp/app/file.json", "exclude": "**/node_modules/**" } ] But how to exclude all files under a directory? I tried below way. It is not working "exclude": [ "**/*whatever.pipe.ts", "**/*whatever_else.component.ts" ] So this is my current path for the directory "src/main/assets/js/ngx-typeahead" I have to exclude all the files under this directory from linting. How can i achieve that? Any suggestions would be appreciated

How to exclude all files under a directory in lint using angular CLI?

£可爱£侵袭症+ 提交于 2020-12-13 04:10:10
问题 We can exclude node_modules in this way. "lint": [ { "project": "src/main/webapp/app/file.json", "exclude": "**/node_modules/**" } ] But how to exclude all files under a directory? I tried below way. It is not working "exclude": [ "**/*whatever.pipe.ts", "**/*whatever_else.component.ts" ] So this is my current path for the directory "src/main/assets/js/ngx-typeahead" I have to exclude all the files under this directory from linting. How can i achieve that? Any suggestions would be appreciated

ng test --code-coverage not printing coverage details

ⅰ亾dé卋堺 提交于 2020-12-13 04:09:23
问题 When I run the tests using ng test --code-coverage I get the code coverage as unknown, not sure what might be going wrong. Any help here is appreciated. > ng test --code-coverage 10% building modules 1/1 modules 0 active26 06 2018 11:00:51.088:WARN [karma]: No captured browser, open http://localhost:9876/ 26 06 2018 11:00:51.095:INFO [karma]: Karma v2.0.0 server started at http://0.0.0.0:9876/ 26 06 2018 11:00:51.095:INFO [launcher]: Launching browser Chrome with unlimited concurrency 26 06