Vue.transition()

Vue.transition( id, [hooks] ) Arguments: {String} id {Object} [hooks] Usage: Register or retrieve a global transition hooks object. // register Vue.transition('fade', { enter: function () {}, leave: function () {} }) // retrieve registered hooks var fadeTransition = Vue.transition('fade') See also: Transitions.

lowercase

lowercase Example: {{ msg | lowercase }} ‘ABC’ => ‘abc’

vm.$off()

vm.$off( [event, callback] ) Arguments: {String} [event] {Function} [callback] Usage: Remove event listener(s). If no arguments are provided, remove all event listeners; If only the event is provided, remove all listeners for that event; If both event and callback are given, remove the listener for that specific callback only.

vm.$children

vm.$children Type: Array<Vue instance> Read only Details: The direct child components of the current instance.

partial

partial Attributes: name Usage: <partial> elements serve as outlets for registered template partials. Partial contents are also compiled by Vue when inserted. The <partial> element itself will be replaced. It requires a name attribute which will be used to resolve the partial’s content. Example: // registering a partial Vue.partial('my-partial', '<p>This is a partial! {{msg}}</p>') <!-- a static partial --> <partial name="my-partial"></partial> &l

beforeCompile

beforeCompile Type: Function Details: Called right before the compilation starts. See also: Lifecycle Diagram

Conditional Rendering

v-if In string templates, for example Handlebars, we would write a conditional block like this: <!-- Handlebars template --> {{#if ok}} <h1>Yes</h1> {{/if}} In Vue.js, we use the v-if directive to achieve the same: <h1 v-if="ok">Yes</h1> It is also possible to add an “else” block with v-else: <h1 v-if="ok">Yes</h1> <h1 v-else>No</h1> Template v-if Because v-if is a directive, it has to be attached to a single element. But what if we want

Computed Properties

In-template expressions are very convenient, but they are really meant for simple operations only. Templates are meant to describe the structure of your view. Putting too much logic into your templates can make them bloated and hard to maintain. This is why Vue.js limits binding expressions to one expression only. For any logic that requires more than one expression, you should use a computed property. Basic Example <div id="example"> a={{ a }}, b={{ b }} </div> var vm = new Vue(

detached

detached Type: Function Details: Called when vm.$el is removed from the DOM by a directive or a VM instance method. Direct manipulation of vm.$el will not trigger this hook.

Installation

Compatibility Note Vue.js does not support IE8 and below, because Vue.js uses ECMAScript 5 features that are un-shimmable in IE8. However Vue.js supports all ECMAScript 5 compliant browsers. Release Notes Detailed release notes for each version are available on GitHub. Standalone Simply download and include with a script tag. Vue will be registered as a global variable. Pro tip: don’t use the minified version during development. you will miss out all the nice warnings for common mistakes. D