Vuejs Custom Events
Use props to pass data into child components, custom events to pass data to parent elements. Set listener on component, within its parent:
<button-counter v-on:incrementBy="incWithVal">...</button-counter>
Inside parent component:
methods: {
incWithVal: function (toAdd) { ... }
}
Inside button-counter template:
this.$emit('incrementyBy', 5)