AngularJS 在加载期间将插值呈现为模板语法
AngularJS rendering interpolation as template syntax during load
我的一个客户在他的 AngularJS 项目中遇到了一个问题,即在加载过程中,一些插值在被替换为正确的内容之前呈现为文本。我以前没有遇到过这种行为。有谁知道他们可能做错了什么?
使用 ng-cloak
指令来避免由 html 模板显示引起的不良闪烁效果。
来自文档:
The ngCloak
directive is used to prevent the AngularJS html template from being briefly displayed by the browser in its raw (uncompiled) form while your application is loading.
The directive can be applied to the <body>
element, but the preferred usage is to apply multiple ngCloak directives to small portions of the page to permit progressive rendering of the browser view.
有关详细信息,请参阅
我的一个客户在他的 AngularJS 项目中遇到了一个问题,即在加载过程中,一些插值在被替换为正确的内容之前呈现为文本。我以前没有遇到过这种行为。有谁知道他们可能做错了什么?
使用 ng-cloak
指令来避免由 html 模板显示引起的不良闪烁效果。
来自文档:
The
ngCloak
directive is used to prevent the AngularJS html template from being briefly displayed by the browser in its raw (uncompiled) form while your application is loading.The directive can be applied to the
<body>
element, but the preferred usage is to apply multiple ngCloak directives to small portions of the page to permit progressive rendering of the browser view.
有关详细信息,请参阅