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

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -