Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

AngularJS ng-cloak Directive

AngularJS ng-cloak Instruction

AngularJS Reference Manual AngularJS Reference Manual


AngularJS Examples

Prevent the application from flickering when the page loads:

<

div

ng-app=

""

<

p

ng-cloak

{{ 5 + 5 }}

<

/p

<

/div

Try it »


Definition and Usage

ng-cloak The directive is used to prevent issues 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 is not fully loaded, resulting in a flickering effect. ng-cloak The directive is used to prevent this problem from occurring.


Syntax

<

element

ng-cloak

<

/element

All HTML elements are supported.


Parameter value

ng-cloak The directive has no parameters.


AngularJS Reference Manual AngularJS Reference Manual