Home
Angular - Do you know the stuff to install?
  v8.0 Posted at 10/03/2017 2:43 AM by Tiago Araujo

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.

angular-quick-start.png
Figure: Bad example - Don 't use the Angular QuickStart because you have to setup everything manually (the CLI gives you it all automatically)
  1. Install nodejs V4 and npm V3 or higher https://nodejs.org/en
    Check you have the right versions:

     node -v
     npm -v
     npm -g ls --depth=0

    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.
  2. Install git https://git-scm.com Check you have git: 

    git --version

  3. Install latest Angular CLI [cli.angular.io]cli.angular.io

    Check you have the latest version:

    ng -v
    npm uninstall -g @angular/cli
    npm cache clean
    npm install -g @angular/cli

  4. Troubleshooting
    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  

  5. We recommend if you do not have a great TypeScript enabled IDE yet that you use http://code.visualstudio.com

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address:

    Comments:

    Note: Social Media login for Yotpo is not working in IE or Safari, please use Chrome. We are waiting for Yotpo to fix it.