I have a that renders data from my localstorage. These lines have a Edit function. These brings them to another page. The ng-click function on this link isn't fireing when it is clicked.
The HTML:
<body ng-app="animateApp" ng-controller="appBody" onload="init()">
<ul id="events-list">
</ul>
</body>
The Javascript function that renders the data:
function renderEvent(row) {
return "<li>" + row.title
+ " [<a href='javascript:void(0);' onclick='html5rocks.webdb.deleteEvent(" + row.ID +");'>Delete</a>]"
+ " [<a ng-click='sayHello()' href='#event-edit?eventname=" + row.title + "&eventid=" + row.ID + "'>Edit</a>]</li>";
}
The sayHello() function:
function appBody($scope) {
$scope.sayHello = function() {
setTimeout(function(){
alert('function runned');
var eventname = 'Foo';
var eventid = '1';
$scope.editEventName = eventname;
$scope.editEventId = eventid;
},1);
};
}
How do i get the function fired? When i call the same function outside of the UL it will fire without a problem.