Skip to content

feat($state): event when preventing state transition to self #1021

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

Closed
wants to merge 1 commit into from
Closed

feat($state): event when preventing state transition to self #1021

wants to merge 1 commit into from

Conversation

nikaspran
Copy link
Contributor

Fire a $stateChangeToSamePrevented event when transitioning to self.

This adds an end event broadcast for state change scenario A->B->A (currently, the $stateChangeStart event would be broadcast but neither $stateChangeSuccess nor $stateChangeError would signal the completion - meaning you can't cover the entire state transition via event handling).

Closes #1016

@Cinamonas
Copy link

+1

@nateabele nateabele self-assigned this Apr 17, 2014
@nateabele
Copy link
Contributor

I'll come back to this in a minute.

@sarunas
Copy link

sarunas commented Jun 9, 2014

+1

@marshall007
Copy link

@nateabele can we get a release for this pretty soon? There don't seem to be any possible workarounds.

On a related note, it would be nice if $state.transition were assigned before emitting $stateChangeStart so that you could observe every state transition that way too.

@marshall007
Copy link

Also, even though this would change existing behavior, I think a $stateChangeStart should be emitted even when we're not triggering a reload. That way theres a single $stateChangeStart event per $stateChange(Success|Error|ToSamePrevented) and vice versa.

@nikaspran
Copy link
Contributor Author

@nateabele are there any hopes of getting this merged in?

@nateabele
Copy link
Contributor

Nope, but, you'll have an interface to equivalent functionality in the next release. :-)

@nateabele nateabele closed this Aug 28, 2014
@marshall007
Copy link

@nikaspran I think this will finally be solved once #1090 lands!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event when transition to same state is cancelled
5 participants