Angular - Do you know the stuff to install?
10/03/2017 2:43 AM by
It is suggested using cli.angular.io to start an Angular2 project especially when learning as it is the easiest way to both get started and also follow best practices.
If you are new to Angular we recommend you use VSCode versus Visual Studio 2015/17 as the TypeScript support and project directory (without a Visual Studio Project) is easier.
- Figure: Bad example - Don 't use the Angular QuickStart because you have to setup everything manually (the CLI gives you it all automatically)
- Install nodejs V4 and npm V3 or higher https://nodejs.org/en
Check you have the right versions:
Note: If you do not have the right version of node or npm, it is best to uninstall then and reinstall them and your global npm packages. Using the second command below you can check which global npm packages you have installed so that you can reinstall them afterward.
npm -g ls --depth=0
- Install git https://git-scm.com Check you have git:
- Install latest Angular CLI [cli.angular.io]cli.angular.io
Check you have the latest version:
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli
If you get node gyp errors follow instructions here https://github.com/nodejs/node-gyp
If you get permission errors follow instructions here https://docs.npmjs.com/getting-started/fixing-npm-permissions
- We recommend if you do not have a great TypeScript enabled IDE yet that you use http://code.visualstudio.com
Do you feel this rule needs an update?