$scope.isActive = function (viewLocation) { var cur_path = $location.url().substr(1, viewLocation.length); var active = (cur_path === $location.url()); return active; };
<li style="color:#ffffff;" ng-class="{ active: isActive(submenu.NavigationURL) }" ng-repeat="submenu in menu.SubMenu"> <a href="{{submenu.NavigationURL}}">{{submenu.Name}}</a></li>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)