How to call function on child component on parent events
Give the child component a ref and use $refs to call a method on the child component directly. html: <div id=”app”> <child-component ref=”childComponent”></child-component> <button @click=”click”>Click</button> </div> javascript: var ChildComponent = { template: ‘<div>{{value}}</div>’, data: function () { return { value: 0 }; }, methods: { setValue: function(value) { this.value = value; } } } new … Read more