[Vuejs]-How to execute a method of a nested component

0👍

In most cases you want to avoid doing this if possible. Data should flow down and events should be emitted up.

That being said you can access by adding a ref to the child. In child you add a

<Child ref='foo'></>

Then in your parent you access the component vie ‘this.$refs.foo’ which will have all the normal method and data stuff on the child.

https://v2.vuejs.org/v2/guide/components.html#Child-Component-Refs

Leave a comment