A
A
aloky2018-06-07 12:35:59
Vue.js
aloky, 2018-06-07 12:35:59

Is there another way to not use $parent.$parent?

I want to get a method from parent's parent.
Родитель > РодительМоегоКомпонента > МойКомпонент

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Anton, 2018-06-07
@Fragster

VueX . There is another option with "dependency injection", but as the application grows, everything will get very confused because of this and the code will turn into noodles

0
0xD34F, 2018-06-07
@0xD34F Vue.js

I want to get a method from parent's parent.

Or maybe you do not need any method to receive? Maybe it's better to emit an event and process it?
What you want to do doesn't sound right. You better tell what problem you are trying to solve (or better yet, show the code).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question