Angularjs ng-cloak Instruction
Angularjs instance
Prevent application flicker when page loads:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
<div ng-app="">
<p ng-cloak>{{ 5 + 5 }}</p>
<p><b>Note: < / b > this example only demonstrates the application of instructions. </p>
</div>
</body>
</html>
Run Result:
10
Note: This example simply demonstrates the application of the directive.
Definitions and usage
The ng-cloak directive is used to prevent problems that occur when the ANGULARJS application prevents Angularjs code from loading at load time.
ANGULARJS Application when loading, the document may appear Angularjs code because the ANGULARJS code is not loaded, which will have a blinking effect, ng-
The cloak directive is designed to prevent this problem from occurring.
Grammar
<element ng-cloak></element>
All HTML elements are supported.
Parameter values
The NG-CLOAK directive has no parameters.
The above is the ng-cloak instruction data collation, follow-up continue to supplement, there is a need for the reference of friends.