I’m trying to select name with checkbox in popup menu, it works with first selection, but I can’t select different name second time if input is already filled.
First, it appears with all checked boxes, what look wrong, and secondly, if I select different name, it selects single item again, but now does not adds it into input field
page.html:
<ion-item>
<ion-label>Region</ion-label>
<ion-select [(ngModel)]="region">
<ion-option [value]="region" *ngFor="let loc of locations">
{{loc.name}} </ion-option>
</ion-select>
</ion-item>
page.ts:
region: string = null;
public locations: any[];
constructor(public navCtrl: NavController) {
this.initializeLocations();
}
initializeLocations() {
this.locations = [
{ id: 1, name: 'name 1' },
{ id: 2, name: 'name 2' },
{ id: 3, name: 'name 3' }
];
}
Advice would be helpful