formulario de registo vuejs code example
Example 1: submit form in vue
//HTML
<div id="vueRoot">
<form ref="form">
<input name="vitalInformation" v-model="store.vital">
<a href="#" v-on:click="submit">SUBMIT</a>
</form>
</div>
//JS
vm = new Vue({
el : "#vueRoot",
methods : {
submit : function(){
this.$refs.form.submit()
}
}
});
Example 2: vue form
<input v-model="message" placeholder="edit me">
<p>Message is: {{ message }}</p>