Introduction to Angular, installing Angular Cli, creating an Angular project entry tutorial

Scenes

Angualr is an open source web front-end framework from Google. It was born in 2009, was
created by Misko Hevery and others, and was later acquired by Google. JS is an excellent front-end framework that has been used for a variety of Google products when
in.

Angualr is based on TypeScript and react and vue are more suitable for medium and large-scale enterprise projects than Angular.

Angular official website:

https://angular.cn/

The IDE for developing Angular projects is recommended to use VisualStudioCode

VisualStudioCode download and install and install Chinese plugin tutorial (graphic tutorial):

https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/105556884

Note:

Blog:
https://blog.csdn.net/badao_liumang_qizhi
public concern number of
programs overbearing ape
acquisition-related programming e-books, tutorials and push for free download.

achieve

Angular environment construction

Make sure the computer has the latest stable version of node.js installed

In order to improve the speed and efficiency of npm install, install cnpm here using Taobao mirror

npm install -g cnpm --registry=https://registry.npm.taobao.org

 

 

Then install angular scaffolding globally

npm install -g @angular/cli

or

cnpm install -g @angular/cli

 

 

Angular create project

Create a new folder helloAngular, and then open the command line input under this folder

of the new angulardemo

 

 

Where angulardemo is the project name

Then you will be prompted to add a routing configuration. Choose Yes here, and choose the CSS pre-compiler. Here, choose SCSS and press Enter.

This installation will install the relevant dependencies, that is, perform the npm install operation, so the speed will be slower.

If you just skip the npm install for a new project, you can execute the following command.

of new angulardemo - install install

Then go to the project directory

cd angulardemo

Then install the project dependencies

cnpm install

This will be faster

 

 

If resource busy or locked appears during installation

Close anti-virus software, then delete node_modeules and re-execute cnpm install

If prompted during the installation process, enter Y to enter.

 

 

Run Angular project

of serve --open

 

 

Guess you like

Origin www.cnblogs.com/badaoliumangqizhi/p/12716827.html