Hi I couldnt achieve to assign a variable to value .My code is below .The variable 'it ’ can be assign to value but the data is got from storage which is number can not seen at value .
Any idea
config(it){
console.log("configaration of ",it)
var number:any;let loader = this.loadingCtrl.create({
content: “Kişi yükleniyor”,
});
loader.present();
this.database.getdata(it).then((res)=>{number=res[0][“value”];console.log(“res:”,res[0][“value”]);console.log(“number:”,number);loader.dismiss()})
let alert = this.alertCtrl.create({
title: ‘Login’,
inputs: [
{name: 'name', value: number }, { name: 'phone', value:it } ], buttons: [ { text: 'Vazgeç', role: 'cancel', handler: data => { console.log(number); } }, { text: 'Kaydet', handler: data => { console.log("Kaydet tıklandı")
///delete fonksiyonu çağrılacak //yeni veri kaydedilecek } } ]
});
loader.onDidDismiss(()=>{alert.present()})
}
Thank you in Advance