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
If you want to console your state in the controller then you should console like that:
console.log($state.current.name);
And if you want to console it in views then:
In controller :
$scope.state = $state.current.name;
In Template: print like that
{{state}}