I would like to return the .state(\'name\') when I change location in angular.
.state(\'name\')
From my run() it can return the $state object:
run()
$state
You can listen for '$stateChangeSuccess' and set state accrodingly. For example -
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) { $state.current = toState; } )