var events=require('events').EventEmitter;
var eventEmitter = new events();
eventEmitter.on('hello', function()
{
console.log('Hey !!');
});
eventEmitter.emit('hello');
now if i first emit and then listen it will not print console.Help me to find the reason.
via john33
No comments:
Post a Comment