Vue - Creating a Vue Instance

Each Vue application starts with the creation of a new Vue instance with the Vue function:

var vm = new Vue({
  // options

Although not directly related to the MVVM pattern, Vue's design was partly inspired by it. As a convention, we often use the variable vm (short for ViewModel) to refer to our instance View.

When you build an instance of Vue, you pass in an options object. Most of this guide describes how you can use these options to create your desired behavior. You can also search the complete list of options for comparison in the API.

A Vue framework consists of a root Vue instance created with a new Vue, optionally organized into a tree of nested, reusable components. For example, an all app component tree could look like this:

Root Instance
└─ TodoList
   ├─ TodoItem
   │  ├─ DeleteTodoButton
   │  └─ EditTodoButton
   └─ TodoListFooter
      ├─ ClearTodosButton
      └─ TodoListStatistics

We'll explain about the component system in more detail later. For now, just know that all of the Vue components are also Vie instances, so accept the same options object (except for a few root-specific options).

Never Miss a Post. Subscribe Now!

Contact Us:

Location : Bangalore India.

© 2019 proudly created  by Nawab Ahmad. 

  • Nawab Ahmad
  • Grey Twitter Icon
  • Nawab Ahmad