0

I have an AngularJS 1.0.7 webapp (please don´t say the answer is to migrate to a newer version, it´s not feasible right now).

Simplifying I have a template like:

<html>
<body>
  <div class="wrapper" ng-view></div>
  <div ng-include src="'partials/footer.html'"></div>
</body
</html>

The point is that when the home page is loaded, it seems like the footer is loaded much faster than the content in the ng-view, so it makes an ugly effect to the user, showing the footer on top of the page for some milliseconds until the view is loaded.

How can I avoid this? I don´t think I should include the footer inside all partial views, in that case template wouldn´t make much sense. The only approach that it comes to me, is to develop some signals to block the footer until the view is loaded. Is this the AngularJS way?

Rober
  • 5,868
  • 17
  • 58
  • 110
  • 1
    Check [this](https://stackoverflow.com/questions/32992213/ng-include-and-ng-view-not-loading-at-the-same-time) if it can help you. – N'Bayramberdiyev Apr 03 '19 at 19:51
  • According to the approach suggested in the referenced post, I included next code in my css: [ng\:cloak], [ng-cloak], .ng-cloak { display: none !important; } and also added the directive call in the footer:
    but nothing happes. It´s not working for me. What am I missing?
    – Rober Apr 05 '19 at 06:37
  • You can also use different approach. make footer and other content div to display none by default. Once the page is loaded then remove the display none style from this – Arun Apr 09 '19 at 09:17

0 Answers0