Infinite Loop on ui-router's $stateChangeStart
问题 Ramping up on angular , and ui-router And struggling with redirecting to a different state if a precondition is not met: I tried using an interceptor: (How do I preform a redirect in an angular interceptor). But someone mentioned that handling $stateChangeState would be more appropriate. But I am still running into an infinite loop: /** * Check here for preconditions of state transitions */ $rootScope.$on('$stateChangeStart', function(event, toState) { // which states in accounts to be