AngularJS Instruction Learning

Source: Internet
Author: User

var function () {    return  {        restrict:"E",        Replace:true,        scope:{            "@name",             "=address"        },        Template:"<div>name:{{ Name}} address:{{address}}</div> "    }}

The value of the Name property is preceded by an @ sign, one-way specified, and the name value on the local scope needs to be read from the Name property value of the DOM element that the instruction is applied to, and the name value on the local scope changes if the DOM element's Name property value is changed.

The value of the Address property on the local scope and the Address property value of the DOM element specified by the Address property before the = symbol, two-way connection, the model on the external scope object are required Establish a two-way connection: Changes to the model on the external scope change the Address property on the local scope, and changes to the Address property on the local scope change the model on the external scope.

AngularJS Instruction Learning

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.