Bindings Explanation

Hi everyone! I have a question.
I created small demo project in Angular 2+ and I found one feature: if I delete Node from Diagramm - its automaticly deleting this object from Model and I don’t need to think about deleting this object.
When I delete link - it’s not deleting from model automatictly and I have to change model manualy. My way to do this:

this.myDiagramComponent.diagram.addDiagramListener('SelectionDeleting', (e) => {
  e.subject.each(node => {
    if (node instanceof go.Link) {
      const index = this.diagramLinkData.findIndex(link => === link.key)
      this.diagramLinkData.splice(index, 1);

I don’t understand how to bind Links to Model as Nodes Binded. I didnt find place where to do this.
Please, assist me to understand deeper how it works.

link to project:

Look at the linkDataArray property, there is also nodeDataArry, you can associate node and line data

I have this.
<gojs-diagram #myDiagram

Its binded in diagram, but no effect if delete without manual deleting;

How is your diagramModelChange function defined? If you look at the gojs-angular-basic sample, you can see how that function in that sample syncs up the app data from the data in the GoJS model.

public diagramModelChange(changes: go.IncrementalData): void {
this.skipsDiagramUpdate = true;
this.diagramNodeData = DataSyncService.syncNodeData(changes, this.diagramNodeData);
this.diagramLinkData = DataSyncService.syncLinkData(changes, this.diagramLinkData);
this.diagramModelData = DataSyncService.syncModelData(changes, this.diagramModelData);

when I delete Node in event I recieve
{ removedLinkKeys:[
removedNodeKeys: [0] }

if I delete Link - I recive null, its reason why diagramLinkData isnt syncing;
So, why do I have null when deleting Link in diagramModelChange function?

Which version of gojs-angular are you using?

just updated:
“gojs”: “^2.1.39”,
“gojs-angular”: “2.0.1”,

Can you show me your initDiagram function? Make sure you are setting your Diagram.model’s linkKeyProperty – if you are not, link data changes will not be caught and merged with your diagramModelChanged function. Look at the initDiagram function in gojs-angular-basic to see how this is done, here (GitHub - NorthwoodsSoftware/gojs-angular-basic: Simple project demonstrating usage of our GoJS/Angular components)

If that is not the issue, can you re-upload your entire project? The repo you linked in your initial post 404’s

@ryanj @walter
Hi, guys. Thanks for help.
I found what was wrong.

My Link has userData - > object with fileds.
After I changed this userData I used this: = _.cloneDeep( to trigg changes in model;

But after I deleted Link - It was deleting in diagram, but not in model;

What I use now :
Object.keys(result).map(key => {
this.diagram.model.setDataProperty(, key, result[key]);