navmenu.js 400 B

1234567891011121314151617181920
  1. app.directive('navMenu',[function(){
  2. return {
  3. restrict: 'E',
  4. scope: {
  5. toggleMenu: '&',
  6. isActive: '&'
  7. },
  8. templateUrl: 'app/views/nav-menu.html',
  9. controller: function($scope,$location){
  10. $scope.isActive = function(linkPath){
  11. if(linkPath == $location.path()){
  12. return true;
  13. } else{
  14. return false;
  15. }
  16. }
  17. }
  18. }
  19. }])