AngularJs Learning Notes Overview

Source: Internet
Author: User

    1. built discussion Put the script in <body> the bottom of the element. This will increase the page load speed, because HTML loading is not subject to script loading .

2. AngularJS expanded HTML through ng-directives .

Ng-app directive defines a AngularJS Application. ( If you remove the Ng-app directive,HTML will directly display The expression and will not Count of the calculation expression Knot The results. )

Ng-model The directive binds the element value (such as the value of the input field) to the application. (likethe Index of input value)

Ng-bind directive binds the application data to the HTML view.

Ng-init Initialization of Instructions AngularJS Application Variables .

3. HTML5allowedXu Extension(self-made) properties todata-OpenHead.
AngularJSproperty tong-OpenHead, but you can usedata-ng-come toLetNetPage PairHTML5effective.

4. The AngularJS expression is written in double curly braces:{{expression}}.

AngularJS expressions bind data to HTML, which is similar to the ng-bind directive.

AngularJS will " output " The data where the expression is written .

AngularJS An expression much like JavaScript An expression : They can contain literals, operators, and variables.

Example {{5 + 5}} or {{firstName + "" + LastName}}


5. The AngularJS module defines the AngularJS application.

The AngularJS controlleris used to control AngularJS applications.

Ng-app The directive defines the application andNg-controller defines the controller.


6. similar to JavaScript expressions,AngularJS expressions can contain letters, operators, and variables.

Unlike JavaScript expressions,AngularJS expressions can be written in HTML .

Unlike JavaScript expressions,AngularJS expressions do not support conditional judgments, loops, and exceptions.

Unlike JavaScript expressions,AngularJS expressions Support filters.



This article is from the "11885445" blog, please be sure to keep this source http://11895445.blog.51cto.com/11885445/1910444

AngularJs Learning Notes Overview

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.