this is my array:
people: any = [{
“name”: “Douglas”,
“value”: 1
},{
“name”: “Mcleod”,
“value”: 2
},{
“name”: “Day”,
“value”: 3
}];
this is ionic list:
<ion-item *ngFor=“let name of people; let i=index”>
<ion-label (ionSelect)=“setPerson($event)”>{{name.name}}
<ion-radio (ionSelect)=“setPerson($event)” value="{{name.value}}">
this the function called when radio button is selected:
setPerson(person){
alert(persion)
}
ionselect is triggered if radio button is selected. The problem is when I change the people list on button (click) = “refreshList()”
refreshList(){
people = [{
“name”: “Aguirre”,
“value”: 4
},{
“name”: “Cook”,
“value”: 5
},{
“name”: “Meyers”,
“value”: 6
}];
}
the ioni-list is updated with the people listing but the problem is the (ionSelect)=“setPerson($event)” is not triggered anymore on updated people list.
I am new with angular and ionic3. Any help with be greatly appriciated. Thank you!