javascript - AngularJS prevent Flash of unstyled content (FOUC) with angular-css -
i'm using angular-css inject css dynamically in head tag when click on link, see flash of unstyled content. if put css in login.html file, don't have problem. tried add ng-cloak on entire login.html file it's not working (but ng-cloak works correctly first load).
is there way dynamically load css without fouc using angularjs , angular-css ?
is bad practice put css above html in style tag ? can resolve problem , reduce number of requests made browser.
thank you!
you should able fix using ng-cloak , adding following index.html file
[ng:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
Comments
Post a Comment