How do you implement two-way binding?

Posted by Jennifer | Updated on

You can use the v-model directive to create two-way data bindings on form input, textarea, and select elements. Lets take an example of it using input component:

Remember, v-model will ignore the initial value, checked or selected attributes found on any form elements. So it always use the Vue instance data as the source of truth.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers