Closed GlauberF closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This does not mean that the issue is invalid. Valid issues may be reopened.
Thank you for your contributions.
I'm trying to capture the error, but they're not getting it.
code in my route:
resolve: { login: function($q, $auth) { if ($auth.isAuthenticated()) { return true; } else { var errorObject = { code: 'NOT_AUTHENTICATED' }; return $q.reject(errorObject); } } }
code no .run: `$rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error) { event.preventDefault()
})`
answer on error:
where I should receive the error that I created, I get an error from angularjs, where am I wrong ??