Im trying to load data on a ion-select when the user clicks on it but it show empty on firts click, this is my approach but failing
<ion-select [(ngModel)]="gFilter.gMarca" (ionChange)="getMarcas()" (ionSelect)="getFamilia(wm.value)" #wm>
<ion-option *ngFor="let marca of marcas" [value]="marca" >{{ marca.Descripcion }}</ion-option>
</ion-select>
public getMarcas() {
this.loading = true;
this.provider.getVinMarcas().then(data => {
if (data != null) {
this.marcas = data;
this.loading = false;
} else {
//Trigger error message
}
}).catch(error => {
this.loading = false;
this.alert.myAlertMethod('Error',error)
});
}
Any help would be greatly appreciated.