vue-admin icon indicating copy to clipboard operation
vue-admin copied to clipboard

I am unable to make child to parent communication

Open Kuchiriel opened this issue 7 years ago • 1 comments

Hello guys, thanks for this amazing dashboard.

I am using some of the modals available, and passing information from parent to child normally using props, but, when I try to do the oposite, with $emit, it didn't work. I've tried $root.$emit, $parent.$emit, tried to catch the $emit in the template using @event and with $on as well, without success.

Maybe I am missing something, any thoughts?

Kuchiriel avatar Dec 03 '17 16:12 Kuchiriel

You could use this: https://vuejs.org/v2/guide/components.html#Non-Parent-Child-Communication

Or use Vuex as state management as the eventbus will increase maintenance when your application will grow bigger.

PewQuadrat avatar Jan 03 '18 22:01 PewQuadrat