Route Events
import { IEventAggregator } from 'aurelia';
import { IRouteableComponent } from '@aurelia/router';
export class MyComponent implements IRouteableComponent {
constructor(@IEventAggregator readonly ea: IEventAggregator) {
}
bound() {
this.ea.subscribe('au:router:navigation-start', payload => {
// Do stuff inside of this callback
});
}
} Last updated
Was this helpful?