问题描述
我读了从角网站了解的文档。
仍然不具有的概念,如何 $ compileProvider.debugInfoEnabled(假)
里面配置的角度可以通过删除元素级别类(角指令)提高应用程序的性能,结合清晰如 NG-范围
和 NG-孤立范围
。
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
.
有谁知道,怎样的性能提升可以通过在$ compileProvider debugInfoEnabled设置为false发生?
谁能帮我清除我的概念角的 $ compileProvider.debugInfoEnabled 角1.3功能?
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?
任何帮助将AP preciated,在此先感谢:)
Any Help would appreciated, Thanks in advance:)
推荐答案
这是添加到您的DOM元素,这些类指令(指令可以是元素,属性,类或评论)。
These classes that are added to your DOM elements are directives (directive can be elements, attributes, classes, or comments).
当角被编译DOM和击中它的指令运行,然后通过该指令的逻辑改变,操纵,更新,或者是任何任务,该指令要求的角度做的。
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.
例如它会带你的NG-重复指令,并相应建立了多个DOM元素。
For example it will take your ng-repeat directives and build out multiple DOM elements accordingly.
通过消除这些指令(类,如NG-范围和放大器; NG隔离范围的)角在这些位置不会停止和执行逻辑。因为这个原因性能的提高,实现
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提高angularjs 1.3的表现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!