-
Notifications
You must be signed in to change notification settings - Fork 3k
adds statechangecancel event #1090
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
Conversation
👍 |
Any reason this hasn't landed yet? I need this and am working around it for the time being. |
While the state events are probably going to be deprecated in favor of transition callbacks in 1.0, I think this is a reasonable thing to include in 0.2.x, for those who can't (or won't want to) update to 1.0. @nateabele what say you? |
I was always kind of against this because you're basically notifying your own code of what it's doing. I'm willing to be persuaded on this point though. |
If you visit http://rpocklin.github.io/angular-ui-view-spinner/example/index.html and click some links you can see it's a directive that shows a loading spinner while the
In the first case, a I can manually trigger a @nateabele if you are writing both sets of code within the same codebase, you are right you have control over the interactions. But what if you are combining two third party directives which don't directly talk to each other? Eg. the above one and one which pops up a window to prevent unsaved changes in a state being lost? (Eg. https://github.com/facultymatt/angular-unsavedChanges) |
That's fair. Squash & fix the commit message per the contributor guidelines and we'll merge it. |
Done - see #1844 as original PR wasn't mine. |
Implemented in #1844. |
After preventDefault is fired in stateChangeStart, a stageChangeCancel event will be launched.