1 Angular programming Software: Webstorm
2 Angular Environment Construction Nodejs, Angular cli,webstorm
Nodejs Npm-v can see the version of Nodejs after installation is complete
sudo npm install-g @angular/cli (Install angular command line tool)
Ng-v (view angular command-line tool version)
3 Angular Project Document interpretation
Angular-cli.json command-line tool configuration file, referring to a third-party package (Boostrap,jquery) to modify this file
Third-party dependency packages for Package.json applications
Karma.conf.js Protractor.conf.js is a configuration file used for automated testing
Tslint.json Code Quality Check
App folder The code we're writing is going to be in this folder.
Assets to put pictures and other sites related resources
Enviroments Multi-environment Development support configuration
Index.html the entire app's root HTML, system startup files
Main.ts the entry point for the entire Web application script
Polyfill.ts import some libraries so that angular can be run in an older version of the browser
Test.ts for automated testing.
4 angular of component three elements, components must have three elements
@component () decorators, template templates, controller controllers
The controller contains all the properties and methods of the component and binds the data to the template
5 Angular project Start-up
Code Formatting Option+alt+l
ng serve
Creating components ng g component xxx
Creating Services NG G service
Then open http://localhost:4200.
Control+c Stop Terminal
Angular Learning Mac Computer