© Adam Freeman 2018
Adam FreemanPro Vue.js 2https://doi.org/10.1007/978-1-4842-3805-9_14

14. Handling Events

Adam Freeman1 
(1)
London, UK
 
In this chapter, I continue describing the built-in Vue.js directives, focusing on the v-on directive, which is used for event handling and which Table 14-1 puts in context.
Table 14-1

Putting the v-on Directive in Context

Question

Answer

What is it?

The v-on directive is used to listen and respond to events.

Why is it useful?

This directive makes it easy to access component data or invoke methods when responding to an event and makes event handling an integrated part of Vue.js development.

How is it used?

The v-on directive is applied to the HTML element whose events you in which you are interested, and its expression is ...

Get Pro Vue.js 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.