Open ghost opened 11 years ago
Yes. The first argument to EventHorizon.fire is the event name, and the optional second argument is an object that will be passed to the event handlers.
I'm curious what your use case is here so I can keep that in mind for future versions of the package.
On Sunday, March 24, 2013, jjk3 wrote:
Possible to pass values when you fire a manual event?
— Reply to this email directly or view it on GitHubhttps://github.com/belisarius222/meteor-event-horizon/issues/2 .
I am using Session to store a value and read it in the EVentHorizon.on() but I wanted to bypass this and pass a value that can be used directly in the on method.
Cool! That's basically how I've been hoping people would use this. Please let me know if you run into any trouble making that work.
On Sun, Mar 24, 2013 at 4:52 PM, jjk3 notifications@github.com wrote:
I am using Session to store a value and read it in the EVentHorizon.on() but I wanted to bypass this and pass a value that can be used directly in the on method.
— Reply to this email directly or view it on GitHubhttps://github.com/belisarius222/meteor-event-horizon/issues/2#issuecomment-15372403 .
Sweet. Thank you. I am going to give this a try right now. It's clear that you've thought this out very well :+1:
Question, how do I make this work on server side? In my server/server.js, I write the on() method but doesn't seem to be working other than on the client? Did I overlook a step?
Possible to pass values when you fire a manual event?