I am using the go-js diagram for angular. I used your starter app - gojs-angular-basic-master. I am trying to change the color of the link programatically. Upon initializing the diagram, I added this
// Add an event listener for ObjectSingleClicked
dia.addDiagramListener(“ObjectSingleClicked”, e => {
const part = e.subject.part;
if (part instanceof go.Link) { // Check if the clicked object is a link
// Handle the link click event
console.log(“Link clicked:”, part.data);
part.data.color = ‘red’; // this does not work
}
});
How can I change the style of the link?