angular.ru/api/ng.directive:ngClass
HTML
<div ng-app>
<table ng-controller="buyCtrl">
<tr ng-repeat="product in products" ng-mouseover="productHovered($index)">
<td >{{product.name}}</td>
<td class="buy">{{product.count}}/10</td>
<td><a ng-class="product.buttonCss">Купить</a></td>
</tr>
</table>
</div>
CSS
.red{
color:red;
}
.green{
color:green;
}
JavaScript
function buyCtrl($scope) {
$scope.products = [
{name:'Помидоры', count:1, buttonCss:"green"},
{name:'Огурцы', count:0, buttonCss:"green"},
{name:'Картофель', count:0, buttonCss:"green"}
];
$scope.productHovered = function(selectedProductIndex){
$scope.products.forEach(function(product){
product.buttonCss = "green";
});
$scope.products[selectedProductIndex].buttonCss = "red";
}
}
ну и просто меняете buttonsCss у product на нужный вам
залил на
JsFiddle