In the other words, it could be a demo ofcomponents communication.
Get an instance of EasyEvent.
var emitter = new EasyEvent();
Then bind your event.
function callback(data){
console.log('the data is', data);
}
emitter.on('your-event', callback);
function callback(data){
console.log('the data is', data);
}
// bind with once
emitter.once('your-event', callback);
Finally, trigger your event.
emitter.emit('your-event', {data : 'test'});
Remove event.
emitter.off('your-event');