问题描述
这似乎主要是在IE浏览器的问题时,有一个数字图像/脚本加载,可以有良好的时间量,其中文字 {{stringEx pression}}
在标记显示,然后消失,一旦角度做是与它的编译/文档的插值。
It seems to be primarily an issue in IE when there is a number of images/scripts to load, there can be a good amount of time where the literal {{stringExpression}}
in the markup are displayed, then disappear once angular is done with it's compilation/interpolation of the document.
有一个共同的原因,为什么会发生这将表明我做得不对一般,还是有一个已知的办法prevent呢?
Is there a common reason why this would happen which would indicate I'm doing something generally wrong, or is there a known way to prevent this?
推荐答案
我认为你正在寻找的 ngCloak
指令:http://docs.angularjs.org/api/ng.directive:ngCloak
I think that you are looking for the ngCloak
directive: http://docs.angularjs.org/api/ng.directive:ngCloak
从文档:
该ngCloak指令用于prevent的角度HTML模板
被简单地通过浏览器在其原始(未编译)显示
而您的应用程序加载形成。使用这个指令以避免
不良闪烁效应造成的HTML模板显示。
该指令可以被应用到<身体GT;
元素,但通常是
细粒度的应用是为了从中受益pfered $ P $
浏览器视图中逐步呈现。
The directive can be applied to the <body>
element, but typically a fine-grained application is prefered in order to benefit from progressive rendering of the browser view.
这篇关于从angular.js以前,立即显示prevent双大括号标记编译/内插文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!