Update model on deleting a node in the diagram

I need to update the model when trying to delete a node from the diagram. Can you please give me a reference where I could find this functionality in js? Also, while integrating the gojs angular sample project with my project I am getting this error

I did set the linkKeyProperty in GraphsLinkModel to the key that I require…but it is not working
If the angular version does not work, I need to switch to js. Any help would be appreciated…thanks in advance.

There must be some other instance of GraphLinksModel being constructed. Maybe you are calling Model.fromJson and the model you are reading doesn’t have the GraphLinksModel.linkKeyProperty set?