Angular how to prevent FOUC

后端 未结 1 699
眼角桃花
眼角桃花 2021-01-02 19:25

Am I using ng-cloak correctly? In chrome the div with help text flashes before becoming hidden. If I add

style=\"display:none;\"

to the a

相关标签:
1条回答
  • 2021-01-02 19:52

    If you're using ngCloak you have to add specific styles in your <head> (so they work before AngularJS is loaded).

    [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
        display: none !important;
    }
    

    https://docs.angularjs.org/api/ng/directive/ngCloak

    0 讨论(0)
提交回复
热议问题