AngularJS ng-cloak Directive
Definition and Usage
ng-cloak
directive to prevent the display of incomplete AngularJS code when loading AngularJS.
When loading an AngularJS application, it may briefly display AngularJS code before the application is fully loaded and all code is executed, which may cause the HTML document to flicker. Use ng-cloak
The directive can prevent this situation.
Example
Prevent the application from blinking when the page is loaded:
<div ng-app=""> <p ng-cloak>{{ 5 + 5 }}</p> </div>
Syntax
<element ng-cloak></element>
All HTML elements are supported.
Parameters
ng-cloak
The directive has no parameters.