We had the same problem. We solved this based on some internal details of the ui-router implementation; this means that it may break in a future version of angular, but here is the function we used:
function annotatedStateObject(state, $current) {
state = _.extend({}, state);
var resolveData = $current.locals.resolve.$$values;
state.params = resolveData.$stateParams;
state.resolve = _.omit(resolveData, '$stateParams');
state.includes = $current.includes;
return state;
}
This will get the parameters, and includes all (permitted) permission objects. We use this in the callback like this:
$scope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
toState = annotatedStateObject(toState, $state.$current);
var person = toState.resolve.person;
}
I hope this helps!
source
share