I'm using a dashboard template to make some buttons. Each button fires an simple function inside the template.
I have problems sending a msg.payload from the function.
I can't use the predefined ng-click. Here is what i have so far:
<button
ontouchstart="touchFuncttion(0)"
ontouchend="touchFunction(1)">
</button>
<script>
var Q = 1;
function touchFunction(Q) {
if (Q===0){
send something to msg.payload;
}
else if (Q===1) {
send something else to msg.payload;
}
}
</script>
I have read it again and again. The problem is that it uses ng-click to fire this.scope.action. I can't use the predefined ng-directives because it has poor touchsupport. So basically I need to send an msg.payload inside a function in the template.