directive

对象参数:

重点理解:

restirct:"",  //E元素,A属性,C类,A注释

priority,

terminal,

scop:"false/true/{}",  //继承不隔离,继承隔离,不继承隔离

template,

templateUrl,

replace:"false/true",   //自定义标签的存在与不存在

transclude,

controller,

controllerAs,

require:"无/?/^/?^组合,  //作为link函数的第四个参数

函数:

compile:function(tElement, tAttrs, transclude) {

 }

link:function(scope, iElement, iAttrs, controller) {

}

查看地址(含笔记):

https://besswang.github.io/directive/index.html

这里说明的需要重点记忆

原文地址:https://www.cnblogs.com/wang715100018066/p/6714417.html