First step: Install Nodejs
Download the latest version of Nodejs and install, open the cmd command line after installation, and enter the following command:
Node-v
If a similar version number is returned, the Nodejs installation succeeds, as follows:
Second installation of NPM
The new version of Nodejs has its own npm.
Enter the following command directly:
Npm-v
If a similar version number is returned, the NPM is installed
Step three global installation Angular CLI Command Tool
on the cmd command line Enter the following command:
npm install -g @angular/cli
Installation takes a while, please be patient!
When the installation is complete, enter the following command:
ng Help
If a similar interface is present, the installation of the Angular CLI is successful
Fourth step to create the angular project
Run the following command to generate a new project called app and skeleton code for your app:
ng New APP
It will take a while to build a new project, please wait patiently!
In the case of network instability, it is possible to create a failure!
If the interface appears, the project is created successfully:
Fifth Step Start Project
Enter the following command at the command line:
CD APP
ng serve--open
ng serve
The command launches the development server, listens for file changes, and re-constructs the app when the files are modified.
Use the --open
(or -o
) parameter to automatically open the browser and access it http://localhost:4200/
.
Summary: To here angular environment Construction has been completed!
AngularJS4.0 Environment Setup--windows system environment