Skip to content
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

Redux Actions only include onStart and onFinish #8

Closed
lawsumisu opened this issue Jan 20, 2019 · 1 comment
Closed

Redux Actions only include onStart and onFinish #8

lawsumisu opened this issue Jan 20, 2019 · 1 comment

Comments

@lawsumisu
Copy link
Contributor

lawsumisu commented Jan 20, 2019

Currently, the only redux actions for UIRouter transitions are for onStart and onFinish. Based on https://ui-router.github.io/guide/transitions#lifecycle-events, even when the onFinish event fires, the transition has not actually completed, meaning that if a user wants to get the current router state values, they would have to use transition.to() rather than transition.router.globals.current.
The problem is that transition.to() doesn't always have all the params for the next transition (and accessing them requires using param.value), making it tricky to depend on the onFinish event in some cases.

I have a fix (#7) that just adds dispatch for the onSuccess event, which, when fired should have the router state updated successfully.

@elboman
Copy link
Member

elboman commented Apr 19, 2019

Hey, sorry for letting this sit here for a while.
I've merged your PR, I'm adding a couple of changes and I should be able to push a new version of the plugin on npm soon!

@elboman elboman closed this as completed Apr 19, 2019
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

No branches or pull requests

2 participants