We can use ModalController to create a modal view. However if we want to use some of the functions provided such as: onDidDismiss(), why do we have to use ‘async’ and ‘await’ on the modal?
Can someone explain about this?
You don’t (and I would argue that you shouldn’t). You can treat the return value of onDidDismiss()
as an ordinary Promise
:
modal.onDidDismiss().then(result => {
...
});