this.viewCtrl.dismiss(item, this.long, this.lat); // here i want to pass this datas, it will display the error " cannot read property of dismiss undefined"
} else {
alert('Geocode was not successful for the following reason: ' + status);
}
});
presentModal() {
let modal = this.modalCtrl.create(ListPgn,{data:this.issData});
modal.onDidDismiss(data=>{
console.log(data) // this data is the data when you dismiss
})
modal.present();
}
this code is inside the chooseItem function, inside it theres this geocoder, and a function function inside it
this is where i call the dismiss because when i put in outside the function
the long lat with not be stored and will display ‘undefine’
hi, can i ask one thing, i have 2 modal. modal 1 consist of ori datas. modal 2 is where i changed stuff.
however when i use this.viewCtrl.dismiss(); on modal 2, the changed datas is carried back to modal 1. do u have any idea why?