Answers for "how to call function from another component in vue js"

0

how to call function from another component in vue js

Vue.component('component1', {
  methods: {
    c1method: function(){
     alert('this is c1method')
    },
  }
})
Vue.component('component2', {
  methods: {
    c2method: function(){
     component('component1').c1method()//like this
    },
  }
})
Posted by: Guest on September-01-2021

Code answers related to "how to call function from another component in vue js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language