加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – 防止双花括号符号显示之前angular.js编译/插补文档

发布时间:2020-12-17 09:34:54 所属栏目:安全 来源:网络整理
导读:它似乎是主要是一个问题在IE当有许多图像/脚本加载,可以有很多时间显示标记中的文字{{stringExpression}},然后消失一旦角度完成它是文档的编译/内插。 有一个常见的原因,为什么会发生这种情况,这将表明我做的事情一般错误,或有一个已知的方法来防止这一
它似乎是主要是一个问题在IE当有许多图像/脚本加载,可以有很多时间显示标记中的文字{{stringExpression}},然后消失一旦角度完成它是文档的编译/内插。

有一个常见的原因,为什么会发生这种情况,这将表明我做的事情一般错误,或有一个已知的方法来防止这一点?

我认为你正在寻找ngCloak指令: http://docs.angularjs.org/api/ng.directive:ngCloak

从文档:

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.

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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读