Using AngularJs “ng-style” within “ng-repeat” iteration

Don’t use {{}}s inside an Angular expression:

<td ng-style="set_color(payment)">{{payment.number}}</td>

Return an object, not a string, from your function:

$scope.set_color = function (payment) {
  if (payment.number > 50) {
    return { color: "red" }
  }
}

Fiddle

Leave a Comment

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