I'm using Node-Red 3.1.3. I put the following code in ui_template:
<script>
function myFunction(mac) {console.log("button click: "+mac); }
</script>
<div ng-repeat="element in msg.payload">
<button onclick="myFunction({{element.mac}})"> </button>
</div>
This causes 'Error: [$compile:nodomevents]'
I also tried the code:
onclick="myFunction('{{element.mac}}')"
onclick="myFunction(element.mac)"
Code from ng-click does not respond to click:
ng-click="myFunction('abc')"
Only this code works:
onclick="myFunction('abc')"
How to properly handle clicking on dynamically created buttons ?