Closed delta711 closed 3 years ago
I've worked around the issue by calling $q.reject()
in the resolver (instead of transition.abort()
). This allows me to handle special cases in an onError() handler.
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.
This is a (check one box):
My version of UI-Router is: 1.0.25
Bug Report
Current Behavior:
Forcing a transition to fail via transition.abort() does not invoke onError.
The following transition:
With the following onError hook:
Appears in the console as follows:
Expected Behavior:
If a Transition fails, its promise is rejected and the onError hooks are invoked. https://ui-router.github.io/ng2/docs/5.0.0/classes/transition.transition-1.html#onerror
Link to Plunker or stackblitz that reproduces the issue:
http://plnkr.co/edit/S4lac3e0I3PvKzzx