In my project, I am currently utilizing ui-router version 1.0.0-alpha.3. Please note that the older events have been deprecated in this version.
As a result, I am in the process of migrating from:
$rootScope.$on('$stateChangeStart', (event, toState) => {
//...
});
To the modern approach using the $transitions.onStart hook:
$transitions.onStart( {}, function($state, $transition$) {
//...
});
I am wondering where I can access the toState parameter in this new setup?