Hi, I would like to open a dynamic URL by clicking on a button using the HTML template node.
My msg.payload has the following items:
- name: device name of device
- MAC: device MAC address
- IP: device IP address
I would like to render a HTML button on the HTML template node that will open a HTML Window to the IP address of the device via HTTP.
My HTML script for the HTML template node is:
<div>
<table border="1" ng-if="msg.existingDevs.length">
<tr id="devlist_Row" ng-repeat="row in msg.existingDevs">
<td>{{row.name}}</td>
<td>{{row.MAC}}</td>
<td>{{row.IP}}</td>
<td><button onclick="window.open('http://{{row.IP}}', '_blank', 'width=800,height=600');">Open {{row.name}}</button></td>
</tr>
</table>
</div>
I am not able to render the page obvious the {{row.IP}}
shouldn't be injected into the HTML of the button script in such a manner.
How do I inject the {{row.IP}}
into the example IP Address of http://192.168.1.111
so that upon clicking the button, a browser window would be rendered for the Device's console panel in another window for the Device with IP of 192.168.1.111 ?