Reputation: 13310
I have an input type of radio, when using Angular to wire up the backend. However, it is currently allowing multiple selections, which is completely odd since radio is by default single selection.
<div ng-repeat="s in survey">
<input type="radio" data-ng-model="s.isSelected">{{s.id}}
</div>
Has anyone run into this, or notice something I am missing?
Upvotes: 1
Views: 983
Reputation: 104795
Assign a name
attribute with the same value to all radiobuttons in the same group.
ex:
<input type="radio" name="group1" data-ng-model="s.isSelected">{{s.id}}
Upvotes: 2