Having trouble making this work!
I have included the $emit
code in my click event to trigger a custom event.
<h2 class="form_section--header">Business Hours - <a href="javascript:void(0)" v-on:click="$emit('addBusinessHours', null)">Add New</a></h2>
Next, I catch this event on the component within the same Vue application. I currently handle this on the template, but would prefer handling it in the code:
<business-hours :injected-data="hours" :injected-days="data.days[0]" v-on:addBusinessHours="test()">
Just a heads up, my business-hours
component is nested within another component.