I'm trying to render some radio buttons
using *ngFor
and only I can select either the first or the last option, never the middle options. >
I have the following array
:
[
{
"title": "First question",
"options": [
{
"title": "Title 1",
"correct": 0
},
{
"title": "Title 2",
"correct": 0
},
{
"title": "Title 3",
"correct": 0
},
{
"title": "Title 4",
"correct": 1
},
]
}
]
<ion-card *ngFor="let question of questions">
<ion-card-content>
<form>
{{ question.title }}
<ion-list radio-group>
<ion-item *ngFor="let option of question.options">
<ion-label>{{ option.title }}</ion-label>
<ion-radio [value]="option.correct"></ion-radio>
</ion-item>
</ion-list>
<button ion-button secondary full>Next question</button>
</form>
</ion-card-content>
</ion-card>
In the example above, even if I render all radio buttons
I can only select Title 1
or Title 4