filterBy

filterBy Limited to: directives that expect Array values, e.g. v-for Arguments: {String | Function} targetStringOrFunction "in" (optional delimiter) {String} [...searchKeys] Usage: Return a filtered version of the source Array. The first argument can either be a string or a function. When the first argument is a string, it will be used as the target string to search for in each element of the Array: <div v-for="item in items | filterBy 'hello'"> In the above example, only items that

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">

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.

mixins

mixins Type: Array Details: The mixins option accepts an array of mixin objects. These mixin objects can contain instance options just like normal instance objects, and they will be merged against the eventual options using the same option merging logic in Vue.extend(). e.g. If your mixin contains a created hook and the component itself also has one, both functions will be called. Mixin hooks are called in the order they are provided, and called before the component’s own hooks. Example: v

vm.$before()

vm.$before( elementOrSelector, [callback] ) Arguments: {Element | String} elementOrSelector {Function} [callback] Returns: vm - the instance itself Usage: Insert the Vue instance’s DOM element or fragment before target element. The target can be either an element or a querySelector string. This method will trigger transitions if present. The callback is fired after the transition has completed (or immediately if no transition has been triggered).

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

components

components Type: Object Details: A hash of components to be made available to the Vue instance. See also: Components

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

computed

computed Type: Object Details: Computed properties to be mixed into the Vue instance. All getters and setters have their this context automatically bound to the Vue instance. Example: var vm = new Vue({ data: { a: 1 }, computed: { // get only, just need a function aDouble: function () { return this.a * 2 }, // both get and set aPlus: { get: function () { return this.a + 1 }, set: function (v) { this.a = v - 1 } } }

vm.$set()

vm.$set( keypath, value ) Arguments: {String} keypath {*} value Usage: Set a data value on the Vue instance given a valid keypath. In most cases you should prefer setting properties using plain object syntax, e.g. vm.a.b = 123. This method is only needed in two scenarios: When you have a keypath string and want to dynamically set the value using that keypath. When you want to set a property that doesn’t exist. If the path doesn’t exist it will be recursively created and made reactive. If