I need current path from url in template (content of $location.path). But not via controller, because I have a lot of controllers (and I do not want to duplicate declaration of
An alternative is to use the more semantic and versatile ui-router, then in the controller, retrieve the current state, and store it on the $scope:
$scope
app.controller('MyCtrl', ['$scope', '$state', function MyCtrl($scope, $state) { $scope.state = $state.current.name; ... }