AngularJS ng-cloakDirective

AngularJS 参考手册AngularJS Reference Manual


AngularJS Example

Prevent the application from flickering when the page loads:

<div ng-app="">

<p ng-cloak>{{ 5 + 5 }}</p>

</div>

Try it Yourself »

Definition and Usage

ng-cloakThis directive is used to prevent problems caused by AngularJS code not being fully loaded when the AngularJS application is loading.

When the AngularJS application is loading, the document may display AngularJS code because the AngularJS code has not finished loading, resulting in a flickering effect.ng-cloakThis directive is to prevent this problem from occurring.


Syntax

<element ng-cloak></element>

Supported by all HTML elements.


Parameter Values

ng-cloakThe directive has no parameters.


AngularJS 参考手册AngularJS Reference Manual

Other Extensions