Im trying to authenticate users for most routes in my application.
is there a way to do it globally on all routes? so i do not need to have the following:
resolve : {
//This function is injected with the AuthService where you'll put your authentication logic
'auth' : function(AuthService){
return AuthService.authenticate();
}
}
on each $routeProvider.when() call.