Follow these steps to create an Angular JS 2 project using Angular CLI.
- Install Angular CLI on your machine
npm install -g angular-cli
If that doesn't work, install
npm install -g @angular/cli
- Create a new project using ng command:
ng new myapp
- Browse to the project folder:
cd myapp
- Run
which starts the development server after building all the modules.npm start
- Point your browser to http://localhost:4200 to see a welcome message, "app works!"