This example shows the form input binding using v-model
. This binding is bi-directional: when the user inputs data in the form control, the corresponding property in the data
model is updated. Similarly, when the property is updated in JavaScript, the form control in the UI is updated accordingly.
vm.name
= {{ name }}vm.univ
= {{ univ }}vm.studyYear
= {{ studyYear }}vm.favSports
= {{ favSports }}Try the following
vm.name = 'Peter'