Hello, I am currently using Angular 16 with the GANTT Chart and have services that I use through the whole application.
Currently, on ngOnInit() I have attached the event ‘onAfterTaskDrag’ and was wondering if inside such event I could call my Angular services, like so:
gantt.attachEvent("onAfterTaskDrag", function (id, mode, e) {
// ----> example <------ //
this.AngularService
.UpdateAngular(id, payload)
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((result: any) => {
console.log(result);
});
}
The error that I get is the following: ERROR TypeError: Cannot read properties of undefined (reading ‘AngularService’) (gantt-scheduler.component.ts:150:12)|
Thanks!