i try to pass the data when modal close. when i click the button close modal it working, but if i click on background, modal is close, but the data is not pass back to the view. because i build the ios for ipad, so i need to take care if user click on background to close modal, they also can get the data.
here is my code
dismiss() {
let data = {title: “hello”};
console.log(‘213131’);
this.viewCtrl.dismiss(data);
}
is there a way to detect the modal background click?
digging around, and i found some result.
modal have two advanced option showBackdrop and endableBackdropDismiss.
for some reason we don’t need click background to get the data, click background mean, user give up data. so we decided to add a button on modal, if user want to pass data, then click the button.