Hey @hally9k, I think to finish the compatibility with ui-router 1.x we still missing a small piece.
As now the flow of transition has changed, the onSuccess transition is happening after the instantiation of the component controller. So we actually need to update the currentParams object on the state before that. There is couple of solutions:
Use the onFinish instead of onSuccess as it is happening always before the instantiation (onFinish is the last transition event before onSuccess):
Add a new toParams object to the state that will be used in the component controller instead of currentParams. This will be updated at onStart time. But using toParams in a controller constructor seems a bit weird.
Dispatch a new action using onFinish or onEnter and update the currentParams at this time instead of at onSuccess time.
FYI the flow of transition is : onBefore > onStart > onEnter > onFinish > onSuccess.
Hey @hally9k, I think to finish the compatibility with ui-router 1.x we still missing a small piece.
As now the flow of transition has changed, the
onSuccess
transition is happening after the instantiation of the component controller. So we actually need to update thecurrentParams
object on the state before that. There is couple of solutions:onFinish
instead ofonSuccess
as it is happening always before the instantiation (onFinish is the last transition event before onSuccess):instead of
toParams
object to the state that will be used in the component controller instead ofcurrentParams
. This will be updated atonStart
time. But usingtoParams
in a controller constructor seems a bit weird.onFinish
oronEnter
and update the currentParams at this time instead of atonSuccess
time.FYI the flow of transition is :
onBefore
>onStart
>onEnter
>onFinish
>onSuccess
.I tested 1 and 3 and it's working fine.
Cheers.
That would fix #74