Requirements: Install node6.9, npm3.0 or above
The next two steps are to complete the construction of the project
1. Install the global angular cli scaffolding
Command
npm install -g @angular/cli
2. In the directory where you want to build the project, shift + right-click the mouse, (select the current window to open the command line), and execute the command under cmd
ng new my-app
Project environment The build is successful. Open the cmd window in the my-app directory and execute npm install to install the dependencies
npm install
. After successfully installing the dependencies, execute the command
ng serve --open
and the project can be run in the browser!
The above is the detailed content of A simple way to build an angular2.0 project. For more information, please follow other related articles on the PHP Chinese website!