© 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 
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



What is it?

The v-model directive creates ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.