Search Posts

Category: route-provider

AngularJS router loads template before resolved

I have a route that checks whether a user is logged in, using a HTTP request, and then either allows access or redirects to a welcome page. My problem is that the template is loaded and displayed before the route is resolved, and I don’t think this gives a very good user experience. I can’t figure out why this it. From Googling similar problems it seems like using a promise solved the issue, but I’m […]