Chris Mendez in Angular, NodeJS

How to install Angular

Here's how to install Angular using Node Package Manager.

Step 1

Install the latest version of Angular.

npm install -g @angular/cli@latest

Step 2

Install the latest version of Typings.

npm install -g typings

Step 3

Install the latest version of Typescript.

npm install -g typescript

Step 4

Install the latest version of Yarn. Yarn is a better package manager than npm. Yes, it's ironic that you use npm to install yarn but in the end, if you want to achieve something similar to Ruby on Rail's "freeze" or bundle package, yarn is your best bet.

npm install -g yarn

Step 5 - Use yarn instead of NPM

Moving forward, you should try using yarn instead of npm i. It will help you experience less dependency hell.

yarn

Step 6 - Create an app

Create a new app and change directory.

ng new myapp && cd myapp  

Step 7 - Learn more

There's a lot more to learn about Angular 2. Here's another tutorial on the different types of commands you can run using Angular command line interface.


Troubleshooting Issues

If you have any issues installing Angular, try these troubleshooting solutions.


Resources