AngularJS ng-cloak Instruction
AngularJS Examples
Prevent the application from flickering when the page loads:
<
div
ng-app=
""
<
p
ng-cloak{{ 5 + 5 }}
<
/p
<
/divTry 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
<
/elementAll HTML elements are supported.
Parameter value
ng-cloak The directive has no parameters.
AngularJS Reference Manual