Meteor: Calling/trigerring events from inside JavaScript? -
i have event looks this:
template.foo.events({ 'bar': function() { console.log("hello!"); } });
how call/trigger within client using js? like:
qwe = new event(foo); qwe.dispatchevent();?
see events in meteor docs: http://docs.meteor.com/#/basic/template-events
"the first part of key (before first space) name of event being captured. pretty dom event supported. common ones are: click, mousedown, mouseup, mouseenter, mouseleave, keydown, keyup, keypress, focus, blur, , change."
so in example, 'bar' should replaced 'click'. fired when template clicked.
Comments
Post a Comment