Here is my ng-repeat code:
<div class="{{event.who_seen_it | newEvent}}" ng-repeat="event in eventList" ng-click="openEvet(event.title,$index)">
<h3 class="event-title">{{event.title}}</h3>
</div>
I am using the {{event.who_seen_it | newEvent}}
to apply a class to each repeated element. I would like to modify the output of this filter newEvent
, add a new class to the current element, or remove the filter {{event.who_seen_it | newEvent}}
by clicking on each repeated element.
I want to accomplish this using the $index
from the controller. How can I achieve this?