Event aggregator
Configuration
Including Event Aggregator in Your Project
import { Aurelia } from 'aurelia-framework';
import { standardConfiguration } from 'aurelia-event-aggregator';
export function configure(aurelia: Aurelia) {
aurelia.use.standardConfiguration();
aurelia.start().then(() => aurelia.setRoot());
}Accessing the Global Event Aggregator
// Accessing the global EventAggregator
const eventAggregator = aurelia.container.get(EventAggregator);Creating Additional Event Aggregator Instances
Using includeEventsIn
includeEventsInPublishing Events
Publishing to a Channel
Publishing a Message Object
Subscribing to Events
Subscribing to a Channel
Subscribing to a Message Type
Merging Event Aggregator into Objects
Best Practices
Last updated
Was this helpful?