English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

AngularJS ng-cloak command

AngularJS Reference Manual

!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.staticfile.org/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
<div ng-app="">
<p ng-cloak>{{ 5 + 5 }}</p>
<p><b>Attention:</b> This example just demonstrates the application of directives.</p>
</div>
</body>
</html>
Test and see ‹/›

Definition and Usage

ng-cloak Directives are used to prevent the problem of incomplete loading of AngularJS code when AngularJS applications are loaded.

When AngularJS applications are loaded, the document may display AngularJS code due to incomplete loading of AngularJS code, resulting in a flickering effect, ng-cloak Directives are used to prevent this problem from occurring.

Syntax

   <element ng-cloak></element>

All HTML elements are supported.

Parameter value

ng-cloak Directives do not have parameters.

AngularJS Reference Manual