Ionic Vue Modal Controller

Hello I would like know how I can close modal created at modal controller with custom component

    async function openSendFinalize() {
      const consend = await modalController.create({
        component: Corfirm,
        componentProps: {
          uid: transfering.identifier,
          message: transfering.message,
        cssClass: "consend__half-container",
        showBackdrop: false,
        swipeToClose: true,
        mode: "ios",
      return consend.present();

at the Confirm.vue component I have no access to modal created from parent component

I was able to do this using a hacky technique by simulating click backdrop


You can also dismiss the top-most modal using modalController.getTop:

const modal = await modalController.getTop();

Oh man, this is the best solution? Feels like baseline functionality for a modal to be able to dismiss itself. I know the Angular folks can get the controller injected into the component, is there no equivalent that can be implemented for Vue?

what’s the difference between angular getting the controller injected and calling

const modal = await modalController.getTop();

you can also just create the modal in the template