Angular JS's powerful function is that it can customize a lot of instructions, now the instructions to do a detailed analysis.
The life cycle of a angular JS instruction (directive) begins at the end of the $compile method with the $link method.
Angular.module (' myApp '), []). Directive (' Mydirective ',function() {return{restrict:string, Priority:number, Terminal:boolean, template:string or template Function: function(TElement, Tattrs) (...}, templateurl:string, Replace:boolean or String, Scope:boolean or Object, trans Clude:boolean, controller:string orfunction(scope, element, Attrs, transclude, Otherinjectables) {...}, controlleras:string, require:string, Link: /c2>function(Scope, ielement, Iattrs) {...}, compile://returns an object or Join function, as follows: function(TElement, Tattrs, transclude) {return{pre:function(Scope, ielement, Iattrs, controller) {...}, post:function(Scope, ielement, Iattrs, controller) {...} }//or return functionPostlink (...) { ... }} });
Angular JS in the instruction detailed