从angular.js以前,立即显示prevent双大括号标记编译/内插文件 [英] Prevent double curly brace notation from displaying momentarily before angular.js compiles/interpolates document

查看:106
本文介绍了从angular.js以前,立即显示prevent双大括号标记编译/内插文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎主要是在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 指令:<一href=\"http://docs.angularjs.org/api/ng.directive: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模板显示。

The ngCloak directive is used to prevent the Angular html template from being briefly displayed by the browser in its raw (uncompiled) form while your application is loading. Use this directive to avoid the undesirable flicker effect caused by the html template display.

该指令可以被应用到&LT;身体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双大括号标记编译/内插文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆