Vue.js
Vue.js is an open-source model–view–viewmodel front-end JavaScript framework for building user interfaces and single-page applications.
It was created by Evan You, and is maintained by him and the rest of the active core team members.
Vue.js Syntax
Vue.js lets you extend HTML with HTML attributes called directives, which offers functionality to HTML applications, and provides built-in directives and user defined directives.
The directives are HTML attributes with the prefix v-
.
- Vue.js uses double braces
{{ }}
as place-holders for data.
- A new Vue object is created with
new Vue( )
.
The property el:
binds the new Vue object to the HTML element with id="app"
.
- When a Vue object is bound to an HTML element, the HTML element will change when the Vue object changes.
- The
v-model
directive binds the value of HTML elements to application data (two-way binding).