navCtrl.pop() doesn't call Modal.onDidDismiss()


#1

Hey, I open a Modal by myModal.present(). I also have an listener

myModal.onDidDismiss(() => {
   console.log("dismiss");
});

But when I close the Modal by this.navCtrl.pop() the onDidDismiss() is not called… Any ideas?


#2

you need to import ViewController from “ionic-angular”. then you call this.view.dismiss() instead of using this.navCtrl.pop()


#3

Thx @chanyap92 , this works fine.