0
I need to change the color only of the element that was clicked, in case change the background color of the DIV, I have an ng-repeat, but when clicking on the div, all the others have the background changed.
<div class="cartoes" ng-class="{'active': isActive}" ng-click="isActive=!isActive" ng-repeat="item in vm.data.cartoes track by $index" ng-hide="vm.data.cartaoAtivo.proxy == item.proxy">
<div class="row lista">
<div class="col-xs-10">
<span class="cartao">{{'MY_CARDS.PREPAID_CARD' | translate }} {{ item.number }} </span></br>
<span class="validade">{{'MY_CARDS.CARD_EXPIRING_DATE' | translate }} {{ item.validade }} </span>
</div>
<div class="col-xs-3 text-center">
<span class="ativo">{{ item.status.description }}</span>
</div>
</div>
I change the color of the div with the following sentence ng-class="{'active': isActive}" ng-click="isActive=!isActive"
But in your html is closing the tag div class cards correctly?
– LeAndrade
yes, and I ended up putting it here wrong
– Marcelo Batista