AngularJS ng-cloak Directive


Example

Prevent the application from flicker at page load:

<div ng-app="">

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

</div>
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.


Syntax

<element ng-cloak></element>

Supported by all HTML elements.


Parameter Values

The ng-cloak directive has no parameters.


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.