Angular2 basis

Installation Configuration 1.Angular-cli

Strapping Tools Testing tools ui related

angular used, angular-cli integrated

 

1> Install node.js

2> The main command

the install NPM - G @angular / CLI installation

ng --version / ng -v view version

ng new demo project created

ng serve --open start the project

 

ng g componenet home to create components

ng serve --prod --aot This command can reduce the burden on the project, speed up

ng build --prod --aot compiler to generate the final build something generation dist directory

ng test automatic test

 

2. The three core concepts

Route  Module   Component

(1) Components

Tree-way data flow, 

angular2-dependencies-graph display tool program structure.

(2) NgModule

Functions or related content in the same module, dynamically loaded modules 

Router and with the use of asynchronous modules ngModule

use of asynchronous routing path loadChildren

3. The core idea of ​​architecture

1> DI DI 

 Constructor injection construtor

 Syringe injection

2> Data Binding

4.UI Hyogo

 

Guess you like

Origin www.cnblogs.com/z-ling/p/studyhouse.html