S
S
Syndr0me2019-01-10 17:07:57
JavaScript
Syndr0me, 2019-01-10 17:07:57

How to call parent method from child vue component?

5c375176e3d1a093936241.png
There is something like this component structure built on vue cli, how can I call the method of the main parent from the very last child component or change any of its properties? Let's say when you click on a button.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2019-01-10
@Syndr0me

The correct option is either a chain of $emit and their handlers (you can use the event bus ), or a transition to vuex and their action. Wrong - using $root.method .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question