I tried this and got $parse is undefined
I changed the code to :
angular.module('myApp.directives').directive('rightClick', function () {
return function(scope, element, attr) {
element.bind('contextmenu', function(event) {
event.preventDefault();
var fn = scope.$eval(attr['rightClick']);
return false;
});
}
});
which worked for me.
Any comments?
AngularJs newbie, please be patient !