Answer the question
In order to leave comments, you need to log in
How to pass a click event from component #1 to component #2?
There are 2 components, in component #1 - a button, in component #2 a form, there is also validation, but this is not particularly important.
How to pass a click event from component #1 to component #2, or how to check from a child component for a click in the parent?
Answer the question
In order to leave comments, you need to log in
In general, if a component is tied to a parent component, then this indicates problems with the architecture.
But if you really need it, you can:
1. subscribe to the events of the parent component by accessing it via this.$parent
https://ru.vuejs.org/v2/guide/components-edge-case...
2. parent component can call the methods of any child it has ref
https://ru.vuejs.org/v2/guide/components-edge-case...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question