Angular ui router – Redirection doesn’t work at all
What we would need here, is to do NOT redirect, if the state TO is already the ‘login’. Just a drafted adjustment would be $rootScope.$on( ‘$stateChangeStart’, function(e, toState , toParams , fromState, fromParams) { var isLogin = toState.name === “login”; if(isLogin){ return; // no need to redirect anymore } … And also, we should call … Read more