devtools

devtools Type: Boolean Default: true (false in production builds) Usage: // make sure to set this synchronously immediately after loading Vue Vue.config.devtools = true Configure whether to allow vue-devtools inspection. This option’s default value is true in development builds and false in production builds. You can set it to true to enable inspection for production builds.

vm.$after()

vm.$after( elementOrSelector, [callback] ) Arguments: {Element | String} elementOrSelector {Function} [callback] Returns: vm - the instance itself Usage: Insert the Vue instance’s DOM element or fragment after 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).

vm.$interpolate()

vm.$interpolate( templateString ) Arguments: {String} templateString Usage: Evaluate a piece of template string containing mustache interpolations. Note that this method simply performs string interpolation; attribute directives are ignored. Example: // assuming vm.msg = 'hello' vm.$interpolate('{{msg}} world!') // -> 'hello world!'

Vue.filter()

Vue.filter( id, [definition] ) Arguments: {String} id {Function | Object} [definition] Usage: Register or retrieve a global filter. // register Vue.filter('my-filter', function (value) { // return processed value }) // two way filter Vue.filter('my-filter', { read: function () {}, write: function () {} }) // getter, return the filter if registered var myFilter = Vue.filter('my-filter') See also: Custom Filter

created

created Type: Function Details: Called synchronously after the instance is created. At this stage, the instance has finished processing the options which means the following have been set up: data observation, computed properties, methods, watch/event callbacks. However, DOM compilation has not been started, and the $el property will not be available yet. See also: Lifecycle Diagram

destroyed

destroyed Type: Function Details: Called after a Vue instance has been destroyed. When this hook is called, all bindings and directives of the Vue instance have been unbound and all child Vue instances have also been destroyed. Note if there is a leaving transition, the destroyed hook is called after the transition has finished. See also: Lifecycle Diagram

vm.$eval()

vm.$eval( expression ) Arguments: {String} expression Usage: Evaluate a valid binding expression on the current instance. The expression can also contain filters. Example: // assuming vm.msg = 'hello' vm.$eval('msg | uppercase') // -> 'HELLO'

Custom Directives

Basics In addition to the default set of directives shipped in core, Vue.js also allows you to register custom directives. Custom directives provide a mechanism for mapping data changes to arbitrary DOM behavior. You can register a global custom directive with the Vue.directive(id, definition) method, passing in a directive id followed by a definition object. You can also register a local custom directive by including it in a component’s directives option. Hook Functions A definition object c

v-show

v-show Expects: * Usage: Toggle’s the element’s display CSS property based on the truthy-ness of the expression value. Triggers transitions if present. See also: Conditional Rendering - v-show

beforeDestroy

beforeDestroy Type: Function Details: Called right before a Vue instance is destroyed. At this stage the instance is still fully functional. See also: Lifecycle Diagram