[Vuejs]-Vue run function from child component?

0👍

The best way to achieve that is using Vue Router.

But, if you want to do that without routing you should do it with Dynamic Components

<component is=""></component>

You can see an example here: https://jsfiddle.net/lucaskatayama/256Lo0xa/1/

There is an App, with a button to toggle a component inside <component></component>.

It simulates your switch, by changing the selected component.

Leave a comment