From the course: Vue.js 2 Essential Training

Unlock the full course today

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

Handing user input

Handing user input

From the course: Vue.js 2 Essential Training

Start my 1-month free trial

Handing user input

- [Instructor] So far, vjs has given us a nice templating language, but it's really not a dynamic system, so let's go ahead and add that functionality in this video. What we're going to do is come up in here and add ourselves an input field, and this input field, I'm going to give it a class of form-control, that's just a Bootstrap class and a w-25, which again is another Bootstrap class that makes it 25% of the width of the container. In here, we will use the value directive here, which is the equivalent of a v-bind colon value, to go ahead and echo the value of the maximum variable. As soon as we do that, we have the value right up here of 99, because that's the value of that element. Actually, we should have put this outside the v four, so we'll go ahead and add it over here so it just appears one time at the top. You'll notice that if I change this to something else like 200, the other item doesn't show up and that's because when you use the v-bind directive or this shortcut right…

Contents