December 2017
Beginner to intermediate
412 pages
8h 35m
English
Now that we have a template set up, we can initialize Vue and bind it to the HTML app space by using the following code:
const app = new Vue().$mount('#app');
This code creates a new instance of Vue and mounts it on the HTML element with the ID of app. If you save your file and open it up in a browser, you will notice nothing has happened. However, under the hood, this one line of code has linked the div with the app variable, which is an instance of a Vue application.
Vue itself has many objects and properties that we can now use to build our app. The first one you will encounter is the el property. Using an HTML ID, this property tells Vue which element it should bind to and where the app ...
Read now
Unlock full access