I am attempting to dynamically add a class to an element when it is clicked using AngularJS. The element is generated through ngRepeat, and I need to determine which specific element was clicked by utilizing the ng-click="foo()" directive.
Here is a snippet of the code (note: the controller and app call are omitted for brevity):
function campaign_list_controller($http) {
this.open_options = function(elem) {
console.log(elem);
}
}
<div class="action_select">
<div class="option" ng-click="ctrl.open_options()">Actions</div>
</div>