You can define the event handlers directly on the DayPilot.Scheduler object (which is available as DayPilotComponent.control).
Just note that DayPilotComponent.control is not available before AfterViewInit:
import {Component, ViewChild, AfterViewInit} from "@angular/core";
import {DayPilotSchedulerComponent} from "daypilot-pro-angular";
@Component({
selector: 'angular2-scheduler-example',
template: `<daypilot-scheduler #scheduler1></daypilot-scheduler>`
})
export class AppComponent implements AfterViewInit {
@ViewChild("scheduler1")
scheduler: DayPilotSchedulerComponent;
ngAfterViewInit(): void {
this.scheduler.control.onResourceExpand = (args) => { this.scheduler.control.message("Expanded"); };
}
}
See also:
https://doc.daypilot.org/scheduler/angular-2/