Here is a code snippet that I need help with: Html
<li ng-class="{ highlight: isActive('/admin/trackDef/list') || isActive('/admin/trackDef/add')}">
<a href="${createLink(uri: '/#/admin/trackDef/list')}"></a>
</li>
Javascript controller
.controller('navCtrl', ['$scope', '$location', function ($scope, $location) {
$scope.isActive = function (viewLocation) {
return viewLocation === $location.path();
};
$scope.isAnyActiveAdmin = function () {
return ['/admin/trackDef/list', '/admin/trackDef/add', '/admin/country/list','/admin/country/add', '/admin/user/list', '/admin/user'].indexOf($location.path()) > -1;
};
}])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.
when('/admin/trackDef/list', {
templateUrl: 'assets/trackDef/trackDef-list.tpl.html',
controller: 'PaginatedListController',
resolve: {Service: 'TrackDefServices'}
}).
when('/admin/trackDef/add', {
templateUrl: 'assets/trackDef/trackDef-save.tpl.html',
controller: 'TrackDefController'
}).
when('/admin/trackDef/:id', {
templateUrl: 'assets/trackDef/trackDef-save.tpl.html',
controller: 'TrackDefController'
});
}])
I'm looking for a way to highlight pages with random addresses like:
/admin/trackDef/123 /admin/trackDef/234 /admin/trackDef/534
and so on