I'm new to angular / ionic development and I'm developing an application that needs to select an item from a radio
and apply a CSS class only to the selected item.
In the way it is implemented I am able to apply the classes in the items but it does not automatically clean the item that is no longer selected.
<form id="gerarSimulado-form25" class="list">
<div class="spacer" style="width: 300px; height: 18px;"></div>
<ion-item class="simulado_enunciado_item">
<h3 class ="simulado_enunciado_font">{{simulado.questao}}</h3>
</ion-item>
<ion-radio ng-class="{'item_selecionado':selecionado}" ng-repeat="alternativa in simulado.alternativas" id="gerarSimulado-radio5"
name="simulado_num_questoes" ng-click="setSiuladoResposta(simulado._id,alternativa);selecionado = !selecionado;">
{{alternativa}}
</ion-radio>
</form>
Any ideas how to solve it?