[Vuejs]-I can not listen from emitting child to parent communication

1👍

no need for the $emit since you are not listening to the emitted event anywhere. I guess looking at your question your requirement needs the mixin mechanism to call the toggle method of your modal.vue.

just below the

components: {
    ModalWindow
  }

in your app.vue add the line

mixins: [ModalWindow]

and add the below line in your toggleModal method

this.toggle();

just below the this.show line. You can also remove the ModalWindow from the components object if mixins work.

Leave a comment