You might be defining onBeforeEventRender handler too late in the component lifecycle (after it is rendered). Try adding it to the config object (see also the Angular 4 Calendar tutorial at https://code.daypilot.org/62826/angular-4-calendar-quick-start-project):
config: any = {
viewType: "Week",
startDate: "2017-05-01",
onBeforeEventRender: args => {
event.e.areas = [{'action':'JavaScript','js':'(function(e) { this.calendar.ontrol.events.remove(e); })','bottom':9,'w':17,'v':'Hover','css':'event_action_delete','top':3,'right':2}];
}
};
Anyway, event deleting functionality is integrated in both the Calendar and Month controls. It's disabled by default. You can enable it using eventDeleteHandling propety:
config: any = {
viewType: "Week",
startDate: "2017-05-01",
eventDeleteHandling: "Update",
onEventDelete: args => {
console.log("Deleting event " + args.e.text());
}
};