Tuesday, February 7, 2017

Create a simple Angular 2 project

In the previous post, we installed node.js and npm. They are needed in our next step to create Angular 2 project.
First, we have to install angular-cli, which will be used to create an angular project, using npm.
npm install -g angular-cli
After that using the angular-cli, we can create angular2 project.
ng new your-project-name
And go to the project directory and run the server.
cd your-project-name
ng serve
The first project will be run on http://localhost:4200.

No comments:

Post a Comment