From the course: Learning Vue.js

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using v-model with related checkboxes

Using v-model with related checkboxes - Vue.js Tutorial

From the course: Learning Vue.js

Start my 1-month free trial

Using v-model with related checkboxes

- [Instructor] Let's take a look at some ways that we can work with checkboxes in Vue. So, here you can see that I've added some options to the Deck Settings page, so far, I've only added some basic HTML, nothing related to Vue or any kind of dynamic behavior. Let's take a look at this first checkbox, include reverse cards just means that, the user would be presented with both sides of the card as they go through the deck. So, they may be shown a description and they'll have to come up with the name of the item and vice versa. One way we might deal with managing the state of this particular checkbox within our Vue app is to set up a data property that's associated with it, which we could call, reverse. This will be a Boolean value because it's just going to keep track of whether this checkbox is checked or unchecked. So, we would initialize to false. And then we would connect that to the checkbox using v-model,…

Contents