vm.$watch()

vm.$watch( expOrFn, callback, [options] ) Arguments: {String | Function} expOrFn {Function} callback {Object} [options]{Boolean} deep {Boolean} immediate Returns: {Function} unwatch Usage: Watch an expression or a computed function on the Vue instance for changes. The callback gets called with the new value and the old value. The expression can be a single keypath or any valid binding expressions. Note: when mutating (rather than replacing) an Object or an Array, the old value will be

debounce

debounce Limited to: directives that expect Function values, e.g. v-on Arguments: {Number} [wait] - default: 300 Usage: Wrap the handler to debounce it for x milliseconds, where x is the argument. Default wait time is 300ms. A debounced handler will be delayed until at least x ms has passed after the call moment; if the handler is called again before the delay period, the delay period is reset to x ms. Example: <input @keyup="onKeyup | debounce 500">

Vue.set()

Vue.set( object, key, value ) Arguments: {Object} object {String} key {*} value Returns: the set value. Usage: Set a property on an object. If the object is reactive, ensure the property is created as a reactive property and trigger view updates. This is primarily used to get around the limitation that Vue cannot detect property additions. See also: Reactivity in Depth

vm.$remove()

vm.$remove( [callback] ) Arguments: {Function} [callback] Returns: vm - the instance itself Usage: Remove the Vue instance’s DOM element or fragment from the DOM. This method will trigger transitions if present. The callback is fired after the transition has completed (or immediately if no transition has been triggered).

orderBy

orderBy Limited to: directives that expect Array values, e.g. v-for Arguments: {String | Array<String> | Function} ...sortKeys {String} [order] - default: 1 Usage: Return a sorted version of the source Array. You can pass any number of Strings to sort on keys. You can also pass an array containing the sorting keys or a Function if you want to use your own sorting strategy instead. The optional order argument specifies whether the result should be in ascending (order >= 0) or desce

vm.$refs

vm.$refs Type: Object Read only Details: An object that holds child components that have v-ref registered. See also: Child Component Refs v-ref.

vm.$data

vm.$data Type: Object Details: The data object that the Vue instance is observing. You can swap it with a new object. The Vue instance proxies access to the properties on its data object.

methods

methods Type: Object Details: Methods to be mixed into the Vue instance. You can access these methods directly on the VM instance, or use them in directive expressions. All methods will have their this context automatically bound to the Vue instance. Example: var vm = new Vue({ data: { a: 1 }, methods: { plus: function () { this.a++ } } }) vm.plus() vm.a // 2 See also: Methods and Event Handling

The Vue Instance

Constructor Every Vue.js app is bootstrapped by creating a root Vue instance with the Vue constructor function: var vm = new Vue({ // options }) A Vue instance is essentially a ViewModel as defined in the MVVM pattern, hence the variable name vm you will see throughout the docs. When you instantiate a Vue instance, you need to pass in an options object which can contain options for data, template, element to mount on, methods, lifecycle callbacks and more. The full list of options can be fou

el

el Type: String | HTMLElement | Function Restriction: only accepts type Function when used in a component definition. Details: Provide the Vue instance an existing DOM element to mount on. It can be a CSS selector string, an actual HTMLElement, or a function that returns an HTMLElement. Note that the provided element merely serves as a mounting point; it will be replaced if a template is also provided, unless replace is set to false. The resolved element will be accessible as vm.$el. When