Start your All-Access Pass to unlock this challenge
Which of these examples will NOT emit an event called button_click when the button is clicked?
button_click
<template> <button :click="$emit('button_click')" /> </template> <script> export default { name: 'ButtonComponent', }; </script>
<template> <button @click="$emit('button_click')" /> </template> <script> export default { name: 'ButtonComponent', }; </script>
<template> <button @click="onButtonClicked" /> </template> <script> export default { name: 'ButtonComponent', methods: { onButtonClicked() { this.$emit('button_click'); }, }, }; </script>
<template> <button v-on:click="onButtonClicked" /> </template> <script> export default { name: 'ButtonComponent', methods: { onButtonClicked() { this.$emit('button_click'); }, }, }; </script>