@perenyitamas wrote:
I have a strange problem. I cannot upload my form’s values to a firebase database because some textboxes are undefinied.
I am loading the data into them from another page with callback via user interaction. What am i missing here? If i edit the textbox like adding an extra character to preloaded value is working normally.
html:
<ion-item> <ion-label fixed>Használt csali</ion-label> <ion-input [(ngModel)]="fogasCsali" type="text"></ion-input> <button ion-button clear item-end (click)="valasztasLadabolcsali()"> <ion-icon name="add-circle">Választás ládából</ion-icon> </button> </ion-item>
ts class:
callback = data => { this.fogasCsali = data.csalineve; };
pushing to firebase:
this.firebasedb.list("/fogasok/") .push({ hasznaltcsali:this.fogasCsali, });
the user choose the value from another page:
addFogashoz(item){ this.navCtrl.pop().then(() => { this.navParams.get('callback')(item); }); }
So basically if the user chooses the value i can see that in the textbox. However it is still undefinied and i have to write additional character to the textbox to get a value,
Posts: 1
Participants: 1