I am building an ionic4 app which uses ion-radio-group to display options from an array. My problem is when I try to select a single radio, all radios are selected. How can I select a single radio?
The code I am using is:
<ion-radio-group [(ngModel)]="singleanswer">
<ion-item *ngFor="let answer of question.answers">
<ion-label>{{answer}}</ion-label>
<ion-radio value="answer">
</ion-radio>
</ion-item>
</ion-radio-group>
Lol! there was a typo in the code.
was supposed to be