on

{ on : { eventName : () => {} } }

Allows you to register event listeners on the component.

var vm = vuenit.component(c, {
  on : {
    'custom-event' : function(){}
  }
});

It is easy enough to add more listeners later:

vm.$on('some-other-event', function(){});

and just as easy to emit component events:

vm.$emit('custom-event');

results matching ""

    No results matching ""