Change values in ng-Template at runtime

Hi!

I'am currently evaluating the diagram component however, I face some problems when binding values in the template.

I have created a ngtemplate as following:

<ng-template #nodeTemplate let-data>
<div>
........
    <div>Input: {{ data.addInfo?.prop1}}</div>
    <div>Output: {{ data.addInfo?.prop2}}</div>
........
</div>
</ng-template>

The nodes are created successfully but when I change the addInfo properties at runtime(from code) the changes are not shown i the diagram. The width is updating as expected.

 
var node: Node = event.source;
node.width = node.width + 100;
node.addInfo.prop1 = "hello";
this.diagram.dataBind();


Thanks!

/Viktor


1 Reply

SG Shyam G Syncfusion Team January 5, 2022 02:17 PM UTC

Hi Viktor,


The node’s addInfo property is used to add custom information in a node. The user can add any information in this property. So, we will not update this property at runtime.


Regards,

Shyam G


Loader.
Up arrow icon