Examples of data binding usage for the Angularjs introductory tutorial _angularjs

Source: Internet
Author: User

This example describes the use of ANGULARJS data binding. Share to everyone for your reference, specific as follows:

Data binding is a very important feature in Angularjs, so let's take a look at the following example:

<! DOCTYPE html>
 
 

This example is very simple, we first run in the browser to see the effect.

When we enter information in the text box, the information we enter is dynamically echoing back to the page.

In this example we use another built-in instruction Ng-modelfor Angularjs, which means that we add a property named "name" to the Model data object ($scope) and bind it to the text box object. This means that whatever we enter in the text box is synchronized to the "name" attribute, Angularjs listens to the form object-related events, so the echo content changes as the text box is entered.

It should be noted that Ng-model can only be used in the form element label.

Angularjs Source can click here to download the site .

I hope this article will help you to Angularjs program design.

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.