uuushka, вот как это должно работать в angular
<!DOCTYPE html>
<html ng-app>
<head>
<script src="http://code.angularjs.org/1.1.4/angular.min.js"></script>
<!--
<script src='http://code.jquery.com/jquery-latest.js'></script>
<link rel='stylesheet type=text/css href=tmp.css' />
-->
<style type='text/css'>
#order_info > span {
font-weight: bold;
}
.order-name {
color: blue;
cursor: pointer;
}
.order-name:hover {
color: red;
}
</style>
<script type='text/javascript'>
function MyController($scope){
$scope.orderField='issue_id';
$scope.newOrder=function(Name){
$scope.orderField=Name;
};
$scope.rowCollection = [
{
issue_id: 2545,
date_issue: new Date('2015-08-26'),
issue_text: 'Не работает кнопка',
group_of_support: '2',
issue_status: 'В процессе',
issue_queue: '0'
},
{
issue_id: 6581,
date_issue: new Date('2015-08-27'),
issue_text: 'не работает сервер',
group_of_support: '3',
issue_status: 'Новая',
issue_queue:'2'
},
{
issue_id: 54885,
date_issue: new Date('2015-08-27'),
issue_text: 'Зависла программа',
group_of_support: '5',
issue_status: 'Отложена',
issue_queue: '4'
}
]
};
</script>
</head>
<body ng-controller="MyController">
<p id='order_info'>Сейчас сортировка по полю <span>{{orderField}}</span></p>
<table>
<thead>
<tr>
<th ng-click='newOrder("issue_id")' class='order-name'>#</th>
<th ng-click='newOrder("date_issue")' class='order-name'>Дата</th>
<th>Задача</th>
<th>Тип задачи</th>
<th>Статус</th>
<th>Очередь</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in rowCollection| orderBy: orderField">
<td>{{row.issue_id}}</td>
<td>{{row.date_issue}}<td>
<td>{{row.issue_text}}<td>
<td>{{row.group_of_support}}<td>
<td>{{row.issue_status}}<td>
<td>{{row.issue_queue}}<td>
</tr>
</tbody>
</table>
</body>
</html>