VueJs V-model

v-model varies based on value of form inputs element or output of components.

v-model directive that makes two-way binding between form input and app state a breeze.

Below the example

<!DOCTYPE html>
<html lang="en">
<head>
   <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
     <div id="app">
	     <input placeholder="enter your name"type="text" name="name" value="" v-model="name">
	     <div> {{ name }} </div>
     </div>
     <script>
     new Vue ({
        	el: '#app',
		data: {
		        name: ''
		}
             })
   </script>
 </body>
</html>

Output

{{ name }}