Redirect to boards when opening login if token exists. Fixes #25.
This commit is contained in:
parent
ec2fb800cb
commit
1875c9682e
@ -62,6 +62,9 @@ function($rootScope, $location, $window, AuthenticationService) {
|
||||
!$window.localStorage.token) {
|
||||
$location.path('/');
|
||||
}
|
||||
if (nextRoute !== null && nextRoute.controller === 'LoginCtrl' && $window.localStorage.token) {
|
||||
$location.path('/boards');
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.$on('$routeChangeSuccess', function(event, route, previousRoute) {
|
||||
|
Reference in New Issue
Block a user