Closed dietergeerts closed 4 years ago
Not sure this is a bug. Try returning a new TargetState:
$transitions.onEnter({}, function (transition) {
return transition.router.stateService.target(myStateDefinition);
});
In the meantime I already found out that returning a target state works, but it should still be documented.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This does not mean that the issue is invalid. Valid issues may be reopened.
Thank you for your contributions.
This is a:
My version of UI-Router is: @uirouter/angularjs v1.0.3
Bug Report
Current Behavior:
I have an onEnter in my state, and when I return a state, nothing happens. Though it's described in the docs:
HookResult: true | false | void | TargetState | Promise<true | false | void | TargetState>
Expected Behavior:
That it just works like documented. (a lot of the documentation is really out of date.
Though there is a workaround, but I don't know if that's the way it should be done: