• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Vue.JS by
Q:
What is difference of v-bind and v-modal of Vue.js?

1 Answer

0 votes
by

v-model is a two-way binding for form inputs. It combines v-bind, which brings a js value into the markup, and v-on:input to update the js value.

Consider:

<input v-model="something">

and it's just syntactic sugar for:

<input
   v-bind:value="something"
   v-on:input="something = $event.target.value"
>

v-model works with all the basic HTML input types (text, textarea, number, radio, checkbox, select). You can use v-model with input type=date if your model stores dates as ISO strings (yyyy-mm-dd).

Related questions

0 votes
asked Jan 9, 2020 in Vue.JS by GeorgeBell
0 votes
asked Jan 9, 2020 in Vue.JS by GeorgeBell
...