我有ng单击相同回调的多个元素:
<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? };
角度方式显示在角度docs 原文链接:https://www.f2er.com/angularjs/146550.html