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

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).

watch

watch Type: Object Details: An object where keys are expressions to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The Vue instance will call $watch() for each entry in the object at instantiation. Example: var vm = new Vue({ data: { a: 1 }, watch: { 'a': function (val, oldVal) { console.log('new: %s, old: %s', val, oldVal) }, // string method name 'b': 'someMe

Vue.mixin()

Vue.mixin( mixin ) Arguments: {Object} mixin Usage: Apply a mixin globally, which affects every Vue instance created afterwards. This can be used by plugin authors to inject custom behavior into components. Not recommended in application code. See also: Global Mixins

Vue.partial()

Vue.partial( id, [partial] ) Arguments: {String} id {String} [partial] Usage: Register or retrieve a global template partial string. // register Vue.partial('my-partial', '<div>Hi</div>') // retrieve registered partial var myPartial = Vue.partial('my-partial') See also: Special Elements - <partial>.

Form Input Bindings

Basics Usage You can use the v-model directive to create two-way data bindings on form input elements. It automatically picks the correct way to update the element based on the input type. Although a bit magical, v-model is essentially syntax sugar for updating data on user input events, plus special care for some edge cases. Text <span>Message is: {{ message }}</span> <br> <input type="text" v-model="message" placeholder="edit me"> Checkbox Single checkbox, boolean v

vm.$on()

vm.$on( event, callback ) Arguments: {String} event {Function} callback Usage: Listen for a custom event on the current vm. Events can be triggered by vm.$emit, vm.$dispatch or vm.$broadcast. The callback will receive all the additional arguments passed into these event-triggering methods. Example: vm.$on('test', function (msg) { console.log(msg) }) vm.$emit('test', 'hi') // -> "hi"

attached

attached Type: Function Details: Called when vm.$el is attached to DOM by a directive or a VM instance method such as $appendTo(). Direct manipulation of vm.$el will not trigger this hook.

vm.$once()

vm.$once( event, callback ) Arguments: {String} event {Function} callback Usage: Listen for a custom event, but only once. The listener will be removed once it triggers for the first time.

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