Created for cross controller communication in a large scale angular SPA. Requires bluebird and lodash.
Creates an emitter instance attached to Domain
Runs event script. See sample script for example
Attaches a function to a domain event. Function may return a promise for asynchronous events.
Broadcasts event to all emitter instances attached to the broadcastings emitter's domain. Returns a promise which resolves when all the event handler return promises are resolved.
Detaches the emitter instance from the domain so it may be garbage collected.