call a function of another component vue

Solutions on MaxInterview for call a function of another component vue by the best coders in the world

showing results for - "call a function of another component vue"
David
24 Oct 2017
1Vue.component('component1', {
2  methods: {
3    c1method: function(){
4     alert('this is c1method')
5    },
6  }
7})
8Vue.component('component2', {
9  methods: {
10    c2method: function(){
11     component('component1').c1method()//like this
12    },
13  }
14})
15
Gautier
07 Aug 2019
1    ....
2    mounted() {
3        this.$root.$on('component1', () => {
4            // your code goes here
5            this.c1method()
6        }
7    }
8
queries leading to this page
vue 3 call function in another componentcall another function from a function vue js call a component as a function vue jscall a component method from another component vuecall function inside child component vuecall a function of another component vuecall function of another component vuecalling this method inside another function in vuecall another component function in vue jscall method inside another method vuehowcall a function using another component vuecall component from function 2b vuecall one function inside another vuehow to call functioni from one component to another component in vue3vuejs call component method from another componentcall a method in another component in vuevue call function in another componenthow to call functioni from one component to another component in vuejscall function from another js file vuehow to call method in another method in vuehow to call function from js file in vuejsvue call function from one component to anothercall function from child component vuehow to call a function in another function vuejscall method from another vuecall other component method in another component vue jscall another component method from different component file in vuejscall another component method in vuejsvue js how to call method from another componenthow to use functions from one vue component to anothervue js call method from another methodhow to call vue function in another jscall function to same component method in vuevuejs call to method in another componentvue call method in another methodcall method from another component vuehow call a function using another component vuevue call method from another methodcall a function of another component vue