Raymond Holguin
Raymond Holguin

Reputation: 1122

AngularJS: lag loading next template

So i have this issue when I click a link to take me to the next page such as

<a href="#/app/nextPage" class="button">Continue</a>

The next template starts loading under the current template, so for a few seconds they are both visible on the screen. Eventually the current template goes away and the new one takes over.

I have provided an example below.

Loading next template lag

As you can see, under the "Continue" button the next template starts to load while the current template is still on the screen.

At first I thought maybe the next template was taking to long to render but I debunked this

  1. It does this even when going from small templates to small templates.
  2. The next template that shows up at the bottom is actually fully rendered.

So its not waiting for the next template to load but appears to be waiting for the current template to disappear.

What do I do to get rid of this lag? Thanks

Angular 1.5.8

Upvotes: 1

Views: 54

Answers (1)

Raymond Holguin
Raymond Holguin

Reputation: 1122

The issue is that I installed the ngAnimate module and it was giving my ngView an animation as it was loading each template. Issue is resolved.

Upvotes: 1

Related Questions