-
Notifications
You must be signed in to change notification settings - Fork 3k
No way to respond to view state change cancellations #2123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There is a stateChangeCancel event: Line 1081 in dba25db
You should probably use a service. Add the state being transitioned to in the stateChangeStart event. Load the spinner for any state in the service. In the stateChange{Success|Cancel} event, remove the state from the service. Once all states have been removed, the spinner should go away as well. closing since its the same question on stackoverflow and its an implementation issue, not ui-router bug. If there is a bug in any of this, we can reopen or a new ticket can be created with the specific bug. |
That cancel event will be called only when we manually cancel a state change (via code) but not in the scenario described above. Please check this Plunk |
So its not really a bug but should be a feature request. |
There is a way currently to handle superseded transition. Need to handle the |
+1 for this issue, I'm having exactly the same problem. Same as @janakerman -
|
In summary, I'm trying to build a loading spinner that shows during state changes. I'm utilising resolves on each of my states. If I transition between them quickly, I have no way of hiding the loading spinner. Here's an event timeline & commentary:
Ideally, I'd receive a
$stateChangeCancelled
event for state B. I could also work with a$stateChangeSuccess
transition for the re-entry into state A (3).A SO post from someone else experiencing a similar problem is available here. He also provides a Plunkr.
The text was updated successfully, but these errors were encountered: