Instance Properties

vm.$el

The DOM element that the ViewModel is managing.

vm.$data

The data object that the ViewModel is observing. You can swap it with a new object. The ViewModel proxies access to the properties on its data object.

vm.$options

The instantiation options used for the current ViewModel. This is useful when you want to include custom properties in the options:

1
2
3
4
5
6
new Vue({
customOption: 'foo',
created: function () {
console.log(this.$options.customOption) // 'foo'
}
})

vm.$

An object that holds child ViewModels that have v-ref registered. For more details see v-ref.

vm.$index

The Array index of a child ViewModel created by v-repeat. For more details see v-repeat.

vm.$parent

The parent ViewModel, if the current ViewModel has one.

vm.$root

The root ViewModel. If the current ViewModel has no parents this value will be itself.

vm.$compiler

The Compiler instance of the ViewModel. This object maintains some internal state of the ViewModel such as data bindings and in most cases you should avoid touching it.