1
vote
2answers
1k views

locationChangeStart and preventing route change

I'm trying to create basic validation whether user can access some route or not. I had progress in that, but there's one thing that I can't figure out. I'm using $locationChangeStart to monitor route ...
4
votes
4answers
3k views

AngularJS | handle routing before they load

I wish to create a simple authentication check for my routes by external service. I define the access requirements on the route object: $routeProvider .when('/', { templateUrl: ...
13
votes
1answer
3k views

Redirect after user has logged in

I'm pretty new to Angular, and right now I'm just trying to get all my routes set up and working as I'd like. Setup: When a user navigates to certain pages (/settings for this example) the app should ...
1
vote
3answers
2k views

AngularJS: How to hide the template content until user is authenticated?

My app has 2 pages: main.html and login.html. When not authenticated users go to /main they should be redirected to /login. The problem is that main.html is rendered first, and after a second or so, ...