I have a problem I have created a directive which is doing ng-repeat on an array of objects

---Showing the value on gui------

Now I want that if I click on any div of this repeat that particular div's background color should change

I have tried something like this

```
link:function(scope,element,attributes){
    $(element).on('click',function(e){
    $(element).addClass('A');
    $(element).removeClass('B');
   })
    }

```