Advertisement
darkmavis1980

Untitled

Jul 17th, 2015
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .directive('goClick', ['$location',
  2.   function($location){
  3.     return {
  4.       restrict: 'AEC',
  5.       scope: {
  6.         path: '@goClick'
  7.       },
  8.       link: function (scope, element, attrs){
  9.         element.click(function(){          
  10.           $location.path(scope.path);
  11.         });
  12.       }
  13.     };
  14.   }
  15. ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement