Angular Learning Mac Computer

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.