Angularjs ng-click on repeat table row not working

You are doing it wrong. You shouldn’t be using curly braces in Angular directives (ng-click), as this syntax is aimed for templates.

A proper way:

<tr ng-repeat="ai in alert_instances" ng-click="go(ai)">
  <td>{{ai.name}}</td>
  <td>{{ai.desc}}</td>
</tr>

$scope.go = function(ai) {
  var hash="/alert_instance/" + ai.alert_instancne_id;
  //...
};

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)