问题描述
我从角度网站上阅读有关的文档。
仍然不清楚概念,如何 $ compileProvider.debugInfoEnabled(false)
内角配置可以通过删除元素级别类(角度)来提高应用程序的性能-directives)绑定,例如 ng-scope
和 ng-isolated-scope
。
有没有人知道,在$ code> $ compileProvider 中将debugInfoEnabled设置为false可以提升性能?
任何人都可以帮助我清除角度上的角度
$ compileProvider.debugInfoEnabled
功能的概念? 任何帮助将会感谢,提前感谢:)
您的DOM元素是指令(指令可以是元素,属性,类或注释)。
当角度编译DOM并命中一个指令时,它将通过该指令逻辑来改变,操纵,更新或做任何任务,这是指令是要求有角度的。
例如,它将采取你的ng-repeat指令和构建相应地删除多个DOM元素。
通过删除这些指令(类似于ng-scope& ng-isolation-scope),角度将不会停止在这些位置并执行逻辑。因此,实现了性能提升。
I read the the documentation from angular website about debugInfoEnabled.Still doesn't clear with concept, how $compileProvider.debugInfoEnabled(false)
inside angular config can improve the performance of application by removing the element level class (angular-directives) binding such as ng-scope
and ng-isolated-scope
.
Does anyone know, how performance boost can happen by setting up debugInfoEnabled to false in $compileProvider
?Can anyone help me to clear out my concept about angular $compileProvider.debugInfoEnabled
feature of angular 1.3?
Any Help would appreciated, Thanks in advance:)
These classes that are added to your DOM elements are directives (directive can be elements, attributes, classes, or comments).
When angular is compiling the DOM and hits a directive it then runs through that directives logic to change, manipulate, update, or do whatever task it is that the directive is asking angular to do.
For example it will take your ng-repeat directives and build out multiple DOM elements accordingly.
By removing these directives (classes like ng-scope & ng-isolated-scope) angular will not stop at these locations and execute logic. Because of this the performance increase is achieved.
这篇关于如何将$ compileProvider.debugInfoEnabled设置为false可以改善anglejs中的性能1.3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!