In Ionic 3, dismissing a modal was pretty simple:
constructor(viewCtrl: ViewController) {
this.viewCtrl.dismiss()
}
In Ionic 4, I can't import ViewController
(or to be accurate, my IDE tries to import a type of ViewController).
I was wondering what the new approach of dismissing a modal is.
According to the docs, it looks like the dismiss
method has moved to ModalController.
So to dismiss a modal, I need to do:
constructor(modalCtrl: ModalController) {
modalCtrl.dismiss();
}
How ironic that I find my answer AFTER I post the question.