Configuration angular operating environment

Resources website : Angular Chinese documents , Angular English documents , Angular community .

1, it is recommended to use programming tools : webstorm, download and install self-Baidu. Reproduced Bowen : WebStorm basic tutorial .

2, install Node.jsnode.js official website to download . Reproduced Bowen : Installation and configuration of Node.js Windows environment chapter .

Please enter the command node -v and npm -v , to verify that you are running more than 3.xx version node 6.9.x and npm.

 Older versions may be an error, an updated version is no problem.

3, Taobao mirror installation

At the command line: NPM CNPM --registry the install -g = HTTPS: //registry.npm.taobao.org

4, the overall installation typescript

cnpm install -g typrscript

5, mounting Angular CLI

cnpm install -g @angular/cli

Now you may be a hello-world Project of

1, enter the command line ng new hello-world --skip-install  will appear on the desktop in a hello-world of a folder

2, into the project: cd the Hello-world

3, using Taobao image installation: CNPM install  and patience. . .

After installing hello_world project which will be one more node_modules folder

4, turn on the local server: ng serve

5, in the address bar type: localhost: 4200  you will see the Welcome to app there is a something big logo!.

Then a basic project is already created.

6, we now do some changes: Open the hello-world / src / app / 

The app.component.ts file title = 'App' ; modify title = 'the HelloWorld' ;

The app.component.html content file delete whole, with < h1 of > {{ title }}! </ H1 of replacement>

After you save the file, the page will automatically refresh the page now only display HelloWorld! A.

Published 25 original articles · won praise 16 · views 40000 +

Guess you like

Origin blog.csdn.net/zouhaodong/article/details/79269910