I would like to use a directive like this :
<my-directive some-method="method(arg0, arg1)"></my-directive>
And the directive looks like :
angular.module('module').directive('myDirective', directive);
function directive() {
return {
restrict:'E',
scope: {
someMethod: '&'
},
template:'<div ng-click="someMethod()"></div>'
};
};
I would like to call method(arg0, arg1) when I call someMethod(). Is it possible ?
method()but without parameters. So I expect some tricks to make this work