ui Template acress from the HTML/Angular-Code to the node name

118 views
Skip to first unread message

Philipp H.

unread,
Aug 8, 2017, 2:31:24 PM8/8/17
to Node-RED UI
Hi all,

I want to acress from the HTML/Angular-Code to the name of the node, but i couldn't read the value.
Could you please give me an idea or solution what's the best way to solve my problem?

i use the normal template-node.

The code:

<p ng-style="{color: 'green'}">{{name}</p>

thank you:)

Colin Law

unread,
Aug 9, 2017, 3:46:59 AM8/9/17
to Philipp H., Node-RED UI
On 8 August 2017 at 19:31, Philipp H. <philipph...@gmail.com> wrote:

> <p ng-style="{color: 'green'}">{{name}</p>

You have a missing }

Colin

Nick O'Leary

unread,
Aug 9, 2017, 4:27:41 AM8/9/17
to Philipp H., Node-RED UI
Well, yes there's a missing } - but more fundamentally, the template has no access to node's properties - it can only received values on the messages it is passed.

Nick

On 8 August 2017 at 19:31, Philipp H. <philipph...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "Node-RED UI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red-contrib-ui+unsub...@googlegroups.com.
To post to this group, send email to node-red-contrib-ui@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red-contrib-ui/3597a152-35a7-4ffd-9f4d-8c41eadfbf7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Philipp H.

unread,
Aug 9, 2017, 4:51:25 AM8/9/17
to Node-RED UI
Thank you for your quick reply and the fundamentally information:)

I will try another way ... is there any way to access to the variables inside the node ? I have build a "IP"-Var inside the JavaScript file from a custom node and i want to access from the HTML/Angular to this var.

Philipp H.

unread,
Aug 9, 2017, 4:54:57 AM8/9/17
to Node-RED UI
Add:

without incoming messages from a another node. The Template are included in my custom node.


Am Dienstag, 8. August 2017 20:31:24 UTC+2 schrieb Philipp H.:
Reply all
Reply to author
Forward
0 new messages