A
A
Anton Antonov2018-06-09 17:32:22
Vue.js
Anton Antonov, 2018-06-09 17:32:22

How to pass events between components in Vue?

How, when clicking on an element of one component, affect another?? joxi.ru/ZrJBvERH1JVa8r Is it possible that
in the component on which you click to create a method and in it js we are looking for the necessary email in the DOM ??

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Neyury, 2018-06-09
@Antoskin

If you are talking about communication between components that are not child or parent to each other, then communication can be organized through the event bus in this way:
Before creating the root component, write this. If the components have a common parent, then it makes sense to describe the logic in it. Anywhere you can send events in this way: Everyone who subscribes through will be able to receive notifications
this.$bus.$on

A
Aleksandr, 2018-06-09
@Sashjkeee

Emit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question