I am attempting to replicate the functionality of nsClick
with my custom directive by changing its priority. Here is my directive code:
angular.module('MyApp').directive('nsClickHack', function () {
return {
restrict: 'E',
priority: 100,
replace: true,
scope: {
key: '=',
value: '=',
accept: "&"
},
link: function ($scope, $element, $attrs, $location) {
$scope.method();
}
}
});
The line I want to bind to is:
<li ng-repeat="item in items" ns-click-hack="toggle(); item.action()">
The functions toggle
and item.action
belong to other directives.
Could you please help me identify where I may have made a mistake?