Put in order · Vue.js course · Module 1: Vue and Vite

Advanced: @click event handling syntax

Arrange the syntax of a button with click event handling in Vue:

Items to put in order

  • @click="handleClick"
  • Click</button>
  • >
  • <button
Show the answer

Correct order:

  1. <button
  2. @click="handleClick"
  3. >
  4. Click</button>