How to create a custom Vue directive

Vue allows create custom directives, modify our HTML elements and behavior, you can recognize easy because the first letter is v- like v-text or v-html. Create a Directive The directives can register global or scoped. Every directive needs the name as the first parameter and object configuration as the second parameter. Vue.directive(‘transparent’, { }); Directive Events Hooks The…

Working with v-model and forms

Vue allows design and manipulates forms elements fast and easy, this is the list of the most common task when we work with HTML forms. Binding Input Use: or v-bind into value property can help you to bind data into the HTML input or use the v-model directive. <input type=”text” :value=”username”/> <input type=”text” v-model=”username”/> Using…