Issue
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.
Solution
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 i(r)onic that I find my answer AFTER I post the question.
Answered By - Eliya Cohen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.