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

15. Working with Form Elements

Adam Freeman1 
(1)
London, UK
 
In this chapter, I describe v-model, which is the built-in directive used for HTML form elements. The v-model directive creates a two-way data binding between a form element and a data value and ensures that the application remains consistent, regardless of how the data is changed. I also show you how to combine the v-model directive with some of the built-in directives described in earlier chapters to validate the data entered into a form by the user. Table 15-1 puts the v-model directive in context.
Table 15-1

Putting the v-model Directive in Context

Question

Answer

What is it?

The v-model directive creates ...

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.