[AngularJS] ngCloak
angularjs
2023-09-14 09:00:55 时间
The ngCloak
directive is used to prevent the Angular html template from being briefly displayed by the browser in its raw (uncompiled) form while your application is loading. Use this directive to avoid the undesirable flicker effect caused by the html template display.
Add those code to css:
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
Usage:
<div id="template1" ng-cloak>{{ 'hello' }}</div> <div id="template2" ng-cloak class="ng-cloak">{{ 'hello IE7' }}</div>
相关文章
- [AngularJS]18. Showing CreatedOn Date
- [AngularJS NG-redux] Integrate Redux Devtools
- [AngularJS + Webpack] Using Webpack for angularjs
- [AngularJS] AngularJS $cacheFactory service
- [AngularJS] Adding custom methods to angular.module
- [AngularJS] Angular 1.3 $submitted for Form in Angular
- [AngularJS]17. Form validation, ng-options