JavaScript reinforcement tutorial-AngularJS commands

Source: Internet
Author: User
Tutorial: JavaScript reinforcement tutorial-AngularJS instructions this article is the official HTML5 training for H5EDU institutions

AngularJS expands HTML by calling the new attribute of the command. AngularJS uses built-in commands to add functions to applications. AngularJS allows you to customize commands. AngularJS commands are extended HTML attributes with the prefix ng -. The ng-app command initializes an AngularJS application. The ng-init command initializes application data. The ng-model command binds the element value (for example, the value of the input field) to the application. For the complete instruction content, see AngularJS reference manual. AngularJS instance

In the input box, try to enter:

Name:

You entered: {firstName }}

Tutorial, mainly introduced: JavaScript reinforcement tutorial-AngularJS command
Ng-app Command tells AngularJS,

The element is the "owner" of AngularJS applications ". Note: A web page can contain multiple AngularJS applications running in different elements. The {firstName} expression in the Data Binding instance is an AngularJS data binding expression. Data Binding in AngularJS synchronizes AngularJS expressions with AngularJS data. {FirstName} is synchronized through ng-model = "firstName. In the next example, two text fields are synchronized using two ng-model commands: AngularJS instances.

Price calculator quantity:Price:

Total price:{Quantity * price }}

The above is the content of the AngularJS command in the JavaScript reinforcement tutorial. For more information, see PHP Chinese website (www.php1.cn )!

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.