Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

AngularJS ng-cloak Directive


Prevent the application from flicker at page load:

<div ng-app="">

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

Try it Yourself »

Definition and Usage

The ng-cloak directive prevents the document from showing unfinished AngularJS code while AngularJS is being loaded.

AngularJS applications can make HTML documents flicker when the application is being loaded, showing the AngularJS code for a second, before all code are executed. Use the ng-cloak directive to prevent this.


<element ng-cloak></element>

Supported by all HTML elements.

Parameter Values

The ng-cloak directive has no parameters.