ANGULARJS Instruction System Series course (1): Catalogue

Source: Internet
Author: User

There's a very powerful command system in Angularjs.such as built-in directives: Ng-app,ng-model,ng-repeat,ng-init,ng-bind, etc.from now on, we'll explain ANGULARJS custom instructions .

first, let's take a look at the new definition of a directive in Angularjs:
Newsapp.directive (' newdirective ', function () {

return {
priority:0,//Priority
Template: ",
Templateurl: ',//Introduce template link
Replace:false,//Replace
Transclude:false,//whether to retain the original content
Restrict: ' E ',//E C A M
Controller: ',//or function () {}
Scope:false,//true or {}
Require: ['? Ngmodel '],//dependencies
Compile:function compile (telement, Tattrs, transclude) {
return {
Pre:function prelink (Scope, ielement, Iattrs, Controller) {

},
Post:function Postlink (Scope, ielement, Iattrs, Controller) {

}
}
},
Link:function Postlink (Scope, ielement, iattrs) {
}
}
});

For these parameters of the directive we are distributed to explain the course catalogue:
    1. Section First: Priority,template,templateurl
    2. Section II: REPLACE,TRANSCLUDE,RESTRICT
    3. Section III: Controller,scope
    4. Section Fourth: Require,ngmodel
    5. Section Fifth: Compile
    6. Section Sixth: Link

ANGULARJS Instruction System Series course (1): Catalogue

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.