Link Template not working for colour changes

arrow colour is unable to change when i change the property of deletable

  diagram.linkTemplate =
        this.$(go.Link,
          {
            curve: go.Link.Bezier,
            relinkableFrom: true, relinkableTo: true,
            toShortLength: 3,
             toEndSegmentLength: 40, fromEndSegmentLength: 40
          },
          new go.Binding("opacity", "opacity").makeTwoWay(),
          new go.Binding("layerName", "isBackground", function(h) { return h ? "Background" : "Foreground"; }),
          this.$(go.Shape,  // the link shape
            { stroke: "gray" },
            new go.Binding("stroke", "isHighlighted", function(h) {
                return h ? "red" : "gray";
              }).ofObject(),
            new go.Binding("stroke", "isAnimated", function(h) {
                  return h ? "gray" : "blue";
                }).ofObject(),
            new go.Binding("strokeWidth", "isHighlighted", function(h) {
                    return h ? 1 : 1;
                  }).ofObject(),
            new go.Binding("stroke", "deletable", function(h) {
                    return h ? "gray" : "black";
                  }).ofObject(),
            new go.Binding("strokeWidth", "deletable", function(h) {
                    return h ? 1 : 2;
                  }).ofObject()
            ),
          this.$(go.Shape, { toArrow: "Standard" },
            new go.Binding("fill", "isHighlighted", function(h) {
              return h ? "red" : "gray";
            }).ofObject(),
            new go.Binding("stroke", "isHighlighted", function(h) {
                return h ? "red" : "gray";
              }).ofObject(),
            new go.Binding("fill", "isAnimated", function(h) {
                  return h ? "gray" : "blue";
               }).ofObject(),
            new go.Binding("stroke", "isAnimated", function(h) {
                  return h ? "gray" : "blue";
                }).ofObject(),
            new go.Binding("stroke", "deletable ", function(h) {
                  return h ? "gray" : "black";
                }).ofObject(),
            new go.Binding("fill", "deletable ", function(h) {
                  return h ? "gray" : "black";
                }).ofObject())
        );

Use lines of triple backquotes to surround your code.

First, I should note that although there is an Link.isAnimated property, it seems highly unusual to want to show statically that the appearance of a link will be animated, rather than just showing the animation when appropriate.

Second, I wonder if you are blindly making all of your Shape Bindings Binding.ofObject, when you actually want the source property to be on the data, not on the GraphObject. Note how the first two Bindings are not ofObject. Are you actually setting the “deletable” property on the link data object in the model? If so, remove the ofObject call.

Thanks Walter, I understood what i was making wrong.