我在ng-click上有多个具有相同回调的元素:
<button ng-click="doSomething()"></button>
<button ng-click="doSomething()"></button>
<button ng-click="doSomething()"></button>
<button ng-click="doSomething()"></button>
// In controller:
$scope.doSomething = function() {
// How do I get a reference to the button that triggered the function?
};
如何获得对调用doSomething的对象的引用?(我需要从中删除一个attr)