How can i catch a modal this.$emit using ionic modal controller


Hello i’m converting somme of my web code to an ionic-vue app and i wanted to know if we can catch a this.$emit from my modal using the ionic modal controller insted of classic vuecomponent.

basically i want to translate

<NewAppointmentModal @onSuccess="handleAppointmentCreation"/>


this.$ionic.modalController.create({ component: NewAppointmentModal}).then(m => m.present())
//how can i catch the onSuccess event like before 



public openModal() {
    return this.$ionic.modalController
      component: ModalComponent,
      componentProps: {
        data: {
          content: 'New Content',
        propsData: {
          //user_id: user_id
        parent: this,
    .then(m => m.present({


public mounted() {
   this.$on('close', (foo) => {


   <ion-button @click="dismissModal()">Close</ion-button>
   dismissModal() {
     this.$parent.$emit('close', { foo: 'bar' })

Answered By – Brian

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published