User Tools

Site Tools


angular

This is an old revision of the document!


Angular is a javascript framework used in frontend websites

Angular CLI

This is an angular component used to manage the angular application from the command line

You can install it from

npm install -g @angular/cli

From this point on, you can use the command “ng” followed by some arguments to achieve some angular management tasks

ng new myfeed

Will create an angular application called myfeed with the right folder structure.

ng serve

With that sentence you'll get the application running. If you are using an old version of angular CLI, perhaps you'll get an error with the versions when you execute.

ERROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected.

This is due to the predefined versions in the package.json. In there you can see things like

a) "rxjs": "6.0.0",
b) "rxjs": "^6.0.0",
c) "rxjs": "~6.0.0",

If ther is no operator (a), it means that the exact 6.0.0 version is required, and it will be downloaded when the “npm install” is done. If there is a“^” operator (b) it means that npm install will get the latest version of the major version of the component, what means that the first number will be allways the same. If there is a “~” operator, it means that npm install will get the latest version of the minor version, what means that the first two numbers will be unaltered.

angular.1590992433.txt.gz · Last modified: 2020/06/01 08:20 by admin