GKD
GKD

Reputation: 53

Angular JS - Page flickering without css

In my web application we have a master index.html , which includes header.html,footer.html,preference.html... and main view content . When the page loads,(url = index.html#) I could see the static content of header,footer and then actual page loads in the screen.

Header.html,footer.html,preference.html requires css path which is fetched from the db through a rest call. Flickering is due to non availability of the css path . Is there a way to suppress the flickering problem ? I have used ng-cloak and its not working as expected.

Thanks in advance.

Das .

Upvotes: 0

Views: 158

Answers (2)

Rahul Arora
Rahul Arora

Reputation: 4543

Try using ng-href with combination of ng-cloak

Also add this to your style tag

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

Upvotes: 0

E. Abrakov
E. Abrakov

Reputation: 463

You can try to write some css in separated file to hide all your content. And some css to redefine styles in your main css. So all content will be hidden while main css is not loaded.

Upvotes: 1

Related Questions