UI Router how to get target state params with $transitions

Viewed 1075

This is for UI Router 1.x

Since $stateParams has been deprecated, and there is no longer a global state object you can inject ($transition$ is not injectable into services/controllers...etc). Similarly it looks like the $rootScope.on('$stateChangeStart') type events are removed.

This leaves the new $transitions object. You can subscribe to events via onStart. Problem is the argument is passes to your callback function doesn't always have the state parameters.

Where can I get the state parameters?

1 Answers
Related