[Vuejs]-How to build a vue form as a component

0👍

Two way binding is reached using the following strategy:

  1. add value as one of your props array.
  2. add v-on:change on the input field inside your component.
  3. on change you should emit the change as following this.$emit('input', newValue).

Now you can use your component: <address-comp v-model='outerObject.address'></address-comp>

Leave a comment