Vue.js Components Local registration of components


Example

A component can be registered either globally or locally (bind to another specific component).

var Child = Vue.extend({
    // ...
})

var Parent = Vue.extend({
    template: '...',
    components: {
         'my-component': Child
    }
})

Thiw new component () will only be available inside the scope (template) of the Parent component.