JavaScript Intensive Tutorial--angularjs instructions

Source: Internet
Author: User

This article is Official HTML5 Training for h5edu institutions

angularjs  expands  html by a new attribute called   Directive  . angularjs  adds functionality to your app with built-in instructions. angularjs  allows you to customize the instructions. The angularjs  Directive angularjs  directive is an extended  HTML  attribute with the prefix  ng-. The ng-app  directive Initializes a  AngularJS  application. The ng-init  instruction initializes the application data. The ng-model  directive binds the element value (such as the value of the input field) to the application. The full instruction content can be found in the  AngularJS  reference manual. angularjs  instance <div ng-app= ""  ng-init= "Firstname= ' John '" > <p> try to enter:</p> in the input box  <p> Name: <input type= "text"  ng-model= "FirstName" ></p> <p> you entered as:  {{ firstname }}</p></div> 

  Tutorial, Main introduction: JavaScript Intensive Tutorials  --AngularJS  directives

The Ng-app directive tells the angularjs,<div> element to be the "owner" of the AngularJS application. Note A Web page can contain multiple AngularJS applications that run in different elements. The {{firstName}} expression in the above instance of data binding is an AngularJS data-binding expression. Data binding in AngularJS, AngularJS expressions and AngularJS data are synchronized. {{FirstName}} is synchronized by ng-model= "FirstName". In the next instance, two text fields are synchronized with two Ng-model instructions: AngularJS instance <div ng-app= "ng-init=" quantity=1;price=5 ">

Click to enter JavaScript intensive tutorial

This article is from the "11721999" blog, please be sure to keep this source http://11731999.blog.51cto.com/11721999/1846679

JavaScript Intensive Tutorial--angularjs instructions

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.