Angularjs basics _ AngularJS

Source: Internet
Author: User
This article mainly introduces some Angularjs basics. For more information, see which ones or who do not know where to start, so here I will follow a simple idea to start writing

1. angular. element
2. angular. Bootstrap

We know very well that the ng-app is applied to the node and angular will automatically initialize it for you. the initialization process is divided into the following steps:

1. angular will be automatically initialized during document load. First, the node specified by the ng-app command will be found.
2. load module-related commands
3. create an injector (dependency manager) related to the application)
4. use the developed ng-app as the root node to start compile the Dom.

Now let's initialize it ourselves to make something equivalent to the ng-app command. Angular. element: this is packaging. it encapsulates the original DOM element or HTML string as the jQuery element. Angular. Bootstrap can manually initialize the script. We use the two to initialize the script.

The code is as follows:






Bootstrap-manual



Here is outside ng-app ~~ {1 + 2 }}

Here is the ~~~~ in ng-app ~~~ {1 + 2 }}


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.