Hi,
I have this situation:
The template node contains a list of link (a href). I want to trigger the same function, but with different parameters. Example:
Link 1: call function('1')
Link 2: call function('2')
"function" is a function that is located in tags. Is it possible?Because nothing happened...
The source of template node is:
<script>
(function() {
function hideShowTab(scope,i) {
scope.send({payload: {"group":{"hide":["Dashboard_Alarm_zone"],"show":["Dashboard_Dettaglio_RSSI"]},"tagId": scope.msg.payload[0]["tagId"],"timestamp" : ""}});
}
(function(scope) {
function sendId(id){
}
scope.$watch('msg.payload', function(newVal, oldVal) {
$( "#alarmList" ).html("<p>Lista allarmi:</p><ul>");
var date;
for(var i=(scope.msg.payload[0]["timestamp"].length-1); i>=0;i--){
console.log("----------"+scope.msg.payload[0]["timestamp"].length);
date = new Date(scope.msg.payload[0]["timestamp"][i]);
$( "#alarmList" ).append("<li><a href='javascript:void(0)' ng-click='javascript:sendId("+i+")'>"+date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear()+" "+date.getHours()+":"+(date.getMinutes()<10 ? "0"+date.getMinutes() : date.getMinutes())+"</a></li>");
}
$( "#alarmList" ).append("</ul>");
})
})(scope)
})();
</script>
<div id="alarmList" >
</div>