Angular:

http://angularjs.org/

by mrajcok

HTML

<div ng-controller="MyCtrl">
    <table>
        <tr ng-repeat="payment in payments">
            <td ng-style="set_color(payment)">{{payment.number}}</td>
        </tr>
    </table>
</div>

JavaScript

var app = angular.module('myApp', []);

app.directive('myDirective', function () {
    return {
        link: function (scope, element, attrs) {},
    }
});
//app.factory('myService', function() {});

function MyCtrl($scope) {
    $scope.payments = [{
        number: 20
    }, {
        number: 60
    }]
    $scope.set_color = function (payment) {
        if (payment.number > 50) {
            return {
                color: "red"
            }
        }
    }
}