How to refer to a flow context variable in ui_template?

Hello,

I created a table using ui_template. I am populating the table with some Objects. Then next to each object I added a button to change the value of an Attribute of the Object assigning it to flow.get("attribute"). But it is not working because I assume there is some specific way I should be referring to the "attribute" var of flow context.

<td><button type="button" ng-click="object.attribute = flow.get('attribute'); send(msg);">Fill</button></td>

If instead of flow.get('attribute') I assign it to a value of my choice, say "att1", it works. So, the only problem is that I am not getting the value of flow.get('attribute').

Node-RED version: v1.3.5
Node.js version: v14.15.1
node-red-dashboard v2.29.1
Windows 10

flow.get is a server side thing. So you can pick up that variable when the send call fires out of the template node.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.