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 (https://github.com/ui-router/redux/pull/7) that just adds dispatch for the onSuccess event, which, when fired should have the router state updated successfully.
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!
Currently, the only redux actions for UIRouter transitions are for
onStart
andonFinish
. Based on https://ui-router.github.io/guide/transitions#lifecycle-events, even when theonFinish
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 usetransition.to()
rather thantransition.router.globals.current
. The problem is thattransition.to()
doesn't always have all the params for the next transition (and accessing them requires usingparam.value
), making it tricky to depend on theonFinish
event in some cases.I have a fix (https://github.com/ui-router/redux/pull/7) that just adds dispatch for the onSuccess event, which, when fired should have the router state updated successfully.