# Dashboard using template node

**URL:** <https://discourse.nodered.org/t/dashboard-using-template-node/3869>\
**Category:** Dashboard\
**Created:** [10 October 2018 21:39 UTC](https://discourse.nodered.org/t/dashboard-using-template-node/3869 "2018-10-10T21:39:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpaolojo](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@cpaolojo](https://discourse.nodered.org/u/cpaolojo)\
**Post date:** [10 October 2018 21:39 UTC](https://discourse.nodered.org/t/dashboard-using-template-node/3869/1 "2018-10-10T21:39:15Z")

</div>

Hi all.  
I'm trying to run the code in attachment (see [https://discourse.nodered.org/](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

 ![code](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e33a5c23c67b09698781607170fb31c2189ebb78.jpeg)

---

<div class="post-metadata">

**Author:** ![seth350](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seth350/32/4617_2.png) [@seth350](https://discourse.nodered.org/u/seth350)\
**Post date:** [11 October 2018 03:48 UTC](https://discourse.nodered.org/t/dashboard-using-template-node/3869/2 "2018-10-11T03:48:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [11 October 2018 04:07 UTC](https://discourse.nodered.org/t/dashboard-using-template-node/3869/3 "2018-10-11T04:07:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cpaolojo](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@cpaolojo](https://discourse.nodered.org/u/cpaolojo)\
**Post date:** [11 October 2018 11:59 UTC](https://discourse.nodered.org/t/dashboard-using-template-node/3869/4 "2018-10-11T11:59:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [11 October 2018 13:11 UTC](https://discourse.nodered.org/t/dashboard-using-template-node/3869/5 "2018-10-11T13:11:06Z")

</div>

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](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

**Author:** ![cpaolojo](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@cpaolojo](https://discourse.nodered.org/u/cpaolojo)\
**Post date:** [11 October 2018 16:01 UTC](https://discourse.nodered.org/t/dashboard-using-template-node/3869/6 "2018-10-11T16:01:21Z")

</div>

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:

> **[Node-RED Dashboard - Button versus Template node](http://node-red.blogspot.com/2017/12/node-red-dashboard-button-versus.html?m=1)**
>
> As mentioned in the previous post, Node-RED has a set of nodes to allow one to develop dashboard panels and one of these nodes is the button...

I hope now is more clear.  
Thanks a lot  
Paolo
