Hello, I have following code:
<ion-select placeholder="Auswählen" value="rundenzahl" okText="Okay" cancelText="Abbrechen" [(ngModel)]="rundenzahl">
<ion-select-option value="3">3</ion-select-option>
<ion-select-option value="4">4</ion-select-option>
<ion-select-option value="5">5</ion-select-option>
<ion-select-option value="6">6</ion-select-option>
</ion-select>
this.rundenzahlSub = this.rundenzahlService.rundenzahl$.subscribe(res => {
console.log((res));
if(res) {
this.rundenzahl = res;
} else {
this.rundenzahl = 3;
}
});
Now there is following problem, first subscribed to rundenzahl$ the value is null because its not loaded from the storage yet. Just then it changes to lets say 3 but instead that 3 is the value selectet in ion-select, it’s still “auswählen”. How can I fix that?