angular-cli

Angular CLI 3rd party lib installation failing

自古美人都是妖i 提交于 2020-01-06 17:10:06
问题 Well, i have a strange situation. I followed all the guides for 3rd party lib installation. When i run ng serve actually i can see the library under dis/vendor/redux. But when i open the browser my app doesnt work and when i check for the resources in developer tools, the library doesnt exist. Where should i look for the problem ? i mean how it is possible that in dist folder i can see the library(in webstorm) but on the browser it doesnt appear ? // SystemJS configuration file, see links for

Angular2 cannot watch when using VSCode

走远了吗. 提交于 2020-01-06 15:20:51
问题 I am writing an Angular2 app and use angular-cli with the command ng serve to serve the app on localhost. This builds the app and serves it and also watches the code for changes. This works fine and when I make any changes to the code and save, angular-cli detects the changes and rebuilds the code and refreshes the browser. This works fine in about any editor I use except for VSCode. When making changes to the code and saving the code in VSCode, it saves the code, however, angular-cli does

Angular app not picked up by github pages?

北城余情 提交于 2020-01-06 08:06:54
问题 First I setup A records for canary.fireflysemantics.com . Then waited an hour (Not sure if time matters?). I created a brand new repository: https://github.com/fireflysemantics/canary/ I then pushed the app using ng deploy like this: ng deploy --base-href=https://canary.fireflysemantics.com --cname=canary.fireflysemantics.com And the files are now in the repository github-pages branch: https://github.com/fireflysemantics/canary However they are not being published / built and the CNAME is not

angular - ANY port is already in use. Use '--port' to specify a different port

落花浮王杯 提交于 2020-01-06 05:51:20
问题 When I will running with ng s or ng serve , any port is in use I haven't project runing, I can put any port, the problem happen. if I try another project in angular, works for information the version $ ng -version Your global Angular CLI version (8.2.0) is greater than your local version (6.2.9). The local Angular CLI version is used. To disable this warning use "ng config -g cli.warnings.versionMismatch false". Angular CLI: 6.2.9 Node: 10.16.3 OS: linux x64 Angular: 6.1.10 ... animations,

Error: ReferenceError: cliSystemConfigPackages is not defined

倖福魔咒の 提交于 2020-01-06 04:52:05
问题 I was trying to get a cerialize package to show in the vendor directory of the dist directory when I start getting the following error message, although ng build and ng server cmds work. The error shows up when I try localhost:4200 in the browser Edit 2 This error might not be dependent on cerialize, because after removing all reference to cerialize in the app, performing an ng build and ng-serve, the problem still persist error (edit 1 for full output) zone.js:323 Error: ReferenceError:

Reference External Javascript Library in .html files with angular-cli

偶尔善良 提交于 2020-01-06 04:47:07
问题 Receiving error 404 referencing a legacy javascript library in angular application. My question is why? These are the characteristics of my build environment Angular CLI: 1.6.0 Node: 7.10.0 OS: win32 x64 Angular: 4.4.6 The image below shows the tag in the index.html referencing the chart.js javascript file that was installed using node. I have checked the path and determined that the file is present at that location and would like to understand why I can't reference the javascript file

How to test apps separately in a multi-app project?

谁说我不能喝 提交于 2020-01-05 08:51:33
问题 I have a multi app project. I can run the apps separately with the following command: ng serve --app <appName> -aot . In the other hand I would like to be able to run the test for each app separately the same as running them. e.g. ng test --app <appName> --sm=false But it's doesn't work as expected. The test started always by the first app in the file system. I have been searching and found out that I might have to change to configuration of the angular-cli.json - Proposal: app-specific karma

What happened to the directives property in the Component decorator for Angular 2?

你离开我真会死。 提交于 2020-01-05 07:43:19
问题 I am using the Angular CLI v1.0.0-beta.19-3 to scaffold/build an Angular 2 website. I generate my component as follows ng g component file-upload . I noticed that the generated component file-upload.component.ts looks like the following. @Component({ selector: 'file-upload', templateUrl: './file-upload.component.html', styleUrls: ['./file-upload.component.css'] }) export class FileUploadComponent implements OnInit { ... } I need to use this component, ng2-file-upload, inside my own component.

angular cli rxjs operator imports

扶醉桌前 提交于 2020-01-05 05:56:59
问题 in my component created with angular cli I never added import 'rxjs/add/operator/first'; however, using this.route.params.first() still worked. why? Is it possible to not have to import lots of operators in every file? 回答1: Imports like import 'rxjs/add/operator/first'; see the operator patched into the Observable prototype. See the source. Such imports do not need to be made on a per-file basis. They only need to be imported once - after which, the operator is callable via the prototype.

@angular-builders - ignore certain script during in the optimisation phase

狂风中的少年 提交于 2020-01-05 04:11:06
问题 I need to make Angular ignore a certain js file during the optimization phase (so that it's not optimized/minified) in prod build. For this purpose the @angular-builders package seemed like a viable solution. I setup the angular.json config as follows: "architect": { "build": { "builder": "@angular-builders/custom-webpack:browser", "options": { "customWebpackConfig": { "path": "./extended-webpack.config.js", "mergeStrategies": { "optimization": "replace" } }, The build configurations are as