AngularJS - how to override directive ngClick
问题 I want to override directive ng-click: to some make some $rootscope changes before each execution of ng-click. How to do it? 回答1: You can't override AngularJS built-in directives. However, you can define multiple directives with the same name and have them executed against the same element. By assigning appropriate priority to your directive, you can then control whether your directive runs before or after a built-in directive. This plunker shows how to build an ng-click directive that