Vue · Junior · Question 8 of 75
How do you listen to a click?
- ✓Correct answer:
@click="save"(shorthand forv-on:click) - 2
onClick={save} - 3
(click)="save()"
Explanation
The handler can be a method name (@click="save") or an inline statement (@click="count++"). The native event is available as $event in inline handlers.