[Vuejs]-Vue.js child-parent component communication

0👍

I am not sure of following syntax.

events: {
  'createauthOnChild': 'createauthentification'
}

As you want to call method of other events, you can implement a event bus.Y ou can use an empty Vue instance as a central event bus:

var bus = new Vue()

// in component A's method
bus.$emit('id-selected', 1)

// in component B's created hook
bus.$on('id-selected', function (id) {
  // ...
})

In more complex cases, you should consider employing a dedicated state-management pattern.

You can see more details on dedicated state management on answer here and here.

Leave a comment