Sorry, but no idea what could be causing this with only the snippet that you shared, could you please share a sample project with your configuration and a sample of data for us to check and debug?
We can see that is is looking at the value of this.client.features.eventDrag. If this is not null then it tries to call _a2.getProxyElement(assignment) which is the exception we get.
In my case, I have the following in my markup...
2023-05-31_10-22-51.png (17.84 KiB) Viewed 479 times
So this.client.features.eventDrag is not equal to null, but is equal to false, so it is trying to call false.getProxyElement(assignment); and hence the exception.
If I remove the [eventDragFeature]="false" then I no longer get the exception and the dependeny line is then drawn. However, in our app we want to disable the drag, so won't want to remove this.
I have attached an updated example from your Ionic example where I have changed it so to emulate how I am building / adding the events, resources and dependencies, i.e. all in code and as a result of a service call. Run this via ionic serve.
To emulate this result coming in "later", click on the "Add Data" button, and this calls addDataClick() in home.page.ts.
A weird thing here is that, in the example, even is I remove the [eventDragFeature]="false", when the dependency is added in the code, I don't see the dependency line being drawn, so I am not sure why this is? In my actual app, as long as I remove the [eventDragFeature]="false" I DO see the dependency line when adding in in code as I do in the example.
Note, in the example, if I manually draw the dependency, then it DOES show up (as long as [eventDragFeature]="false" is not in the html), so not sure why in the case adding it in code it does now show.
Also, in the example if I add back the [eventDragFeature]="false" then I never get the dependency drawn. When I add it manually, I see the same error
Unhandled app exception!: Uncaught TypeError: _a2.getProxyElement is not a function
home.page.ts:78
Uncaught TypeError TypeError: _a2.getProxyElement is not a function
So the extra question is why the dependency is not being drawn when added in code in the example?