Dashboard using template node


#1

Hi all.
I'm trying to run the code in attachment (see https://discourse.nodered.org/):

I would set the dimensions of the "rect" by passing a msg coming from the previous node.
To do this I've tried as following:


but it doesn't work.
Do you have any suggestion for me?
Thanks in advance

Paolo


#2

I’m no Gandalf, but the problem may be with your first line. Specifically the ng-click. I believe this will actually set your payload for the rest of the page. Essentially deleting the properties you need later on in the page.


#3

You can try ng attribute binding something like this:
ng-attr-width="{{msg.your_input_for_width}}"


#4

sorry but I don't understand.
in which line of code have I to put
ng-attr-width="{{msg.your_input_for_width
hanks a lot


#5

I misread your problem. It's not needed.
Have you tried to debug your flow? It will be much easier to help you if you share your flow.
Also read this before sharing.
https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506


#6

you are right.
resuming, I have two nodes. a "function" node (FN) and a "dashboard" node (DN).
FN should pass to DN two messagges which set the dimension of the button defined in the DN:
msg.button_width
and
msg.button_lenght

unfortunately I have some problem to copy the code using the smartphone.
Aniway you can find the flow in the following link:

I hope now is more clear.
Thanks a lot
Paolo