How can I use ngModel to iterate through an enum with ion-select?
export enum EducationLevel {
ILLITERATE = "Illiterate",
1_TO_3_YEARS = "1 to 3 years",
4_TO_7_YEARS = "4 to 7 years",
MORE_THAN_8_YEARS = "more than 8 years"
}
class Person {
...
public education: typeof EducationLevel = EducationLevel;
}
export class RegistrationPage {
...
this.person = new Person();
}
home.html
<ion-select interface="popover" [(ngModel)]="person.education">
<ion-select-option *ngFor="let edu of person.education">
{{edu}}
</ion-select-option>
</ion-select>
I want to display list items in ion-select-option and save the selected item to "this.person"