How to use enableBackdropDismiss with ModalController?


#1

how to use enableBackdropDismiss with ModalController?


#2

Hi @gr00kiter, Did you find solution to this?


#3

myFunction() {
let modal = this.modalCtrl.create(MyCustomPage, {enableBackdropDismiss: false});
modal.present();
}

try this


#4

The correct way is:

let modal = this.modalCtrl.create(YourPage, { params: '...' }, {showBackdrop: true, enableBackdropDismiss: true});
modal.present();

#6

Hi all,
If you created a modal.Then it should dismiss using viewcontroller’s dismiss method
you can pass the parameter while dismiss the modal.

import { ViewController } from 'ionic-angular';
  constructor(public viewCtrl: ViewController) {
}
dismissView(){
 this.viewCtrl.dismiss(
 //pass data what you want on dismiss
);
}