Is there a way in angular.js to toggle a css class active
on and off when clicking on an element? I am familiar with using ng-class
and ng-click
, but how can I refer to the element itself? For instance, if I have three buttons:
<a class="btn" ng-click="" ng-class"">First</a>
<a class="btn" ng-click="" ng-class"">Second</a>
<a class="btn" ng-click="" ng-class"">Third</a>