Answer the question
In order to leave comments, you need to log in
How to set a function in Angular to change the url?
You need to check the token when changing the url, Google suggests this:
.run(function($rootScope) {
$rootScope.$on('$routeChangeSuccess', function () {
if (!$localStorage.token) {
console.log('redirect here');
}
})
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question