AngularJS标准指令优先级列表

前端之家收集整理的这篇文章主要介绍了AngularJS标准指令优先级列表前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在寻找一个标准的angularjs指令列表及其优先级(尤其是非零指令).每当你想要创建一个特殊的指令时,看看它会很有帮助,例如一个带有terminal:true的指令,看看它最适合的位置,同时也更好地理解角度设计者如何使用它们的指令.

我知道每个指令都在其文档页面中指定了它的优先级,但这对编译/链接顺序没有任何帮助,因为像下面这样的列表会:

Directive  - Prio
-----------------
ng-repeat  - 1000
ng-if      -  600
ng-include -  400
...

谢谢.

按优先级排序的标准角度指令列表.希望这会有用.
Directive           Priority    
---------------     -----------
ng-switch           1200    
ng-non-bindable     1000    
ng-repeat           1000    
ng-if               600 
ng-controller       500 
ng-init             450 
ng-include          400 
ng-checked          100 
ng-disabled         100 
ng-open             100 
ng-readonly         100 
ng-selected         100 
ng-href             99  
ng-src              99  
ng-srcset           99  
ng-model            1   
ng-app              0   
ng-bind             0   
ng-bind-html        0   
ng-bind-template    0
ng-blur             0
ng-change           0
ng-class            0
ng-class-even       0
ng-class-odd        0
ng-click            0
ng-cloak            0
ng-copy             0
ng-csp              0
ng-cut              0
ng-dbl-click        0
ng-focus            0
ng-form             0
ng-hide             0
ng-keydown          0
ng-keypress         0
ng-keyup            0
ng-list             0
ng-model-options    0
ng-mousedown        0
ng-mouseenter       0
ng-mouseleave       0
ng-mousemove        0
ng-mouSEOver        0
ng-mouseup          0
ng-options          0
ng-paste            0
ng-pluralize        0
ng-show             0
ng-style            0
ng-submit           0
ng-transclude       0
ng-value            0

参考

> AngularJS 1.5.0 Source

原文链接:https://www.f2er.com/angularjs/143526.html

猜你在找的Angularjs相关文章