hi,
I have three radio buttons, and only one can be checked at a time. If the radio is checked, i add a class to it. But the problem I am having is that the class isnt removed when i click another radio button. Anyone know how I could fix this? I am a noob at angular.js.
Here is my code:
<ul class="row">
<li ng-class="{'active': todo.check}">
<label class="alternative-wrapper alternative-one" for="alt1">
<p>Pulvinar scelerisque non augue augue turpis velit rhoncus elementum elit integer placerat duis.</p>
<input type="radio" class="alt-radio" id="alt1" name="alt" value="alt1" ng-model="todo.check" />
</label>
</li>
<li ng-class="{'active': todo.check2}">
<label class="alternative-wrapper alternative-two" for="alt2">
<p>Pulvinar scelerisque non augue augue turpis velit rhoncus elementum elit integer placerat duis.</p>
<input type="radio" class="alt-radio" id="alt2" name="alt" value="alt2" ng-model="todo.check2" />
</label>
</li>
<li ng-class="{'active': todo.check3}">
<label class="alternative-wrapper alternative-three" for="alt2">
<p>Pulvinar scelerisque non augue augue turpis velit rhoncus elementum elit integer placerat duis.</p>
<input type="radio" class="alt-radio" id="alt2" name="alt" value="alt3" ng-model="todo.check3" />
</label>
</li>
</ul>