I used to have controller in whole <body ng-controller="MainCtrl">, where I had some basic functions like this one:
$scope.isActive = function(route) {
return route === $location.path();
};
Used here:
ng-class="{active:isActive('{{ $link['url'] }}')}"
What's best way how to handle that? It's used in many times on different lists. Should I make a directive?