Smart Table Angular モジュールの単純な並べ替えを行うことができません。に追加st-sort="propertyName"
するだけでいいのではないth
ですか?
JS:
var app = angular.module('app', []);
app.controller('SomeController', ['$scope', function($scope) {
$scope.items = [{color:'red'},{color:'blue'}];
}]);
HTML:
<html ng-app="app"><body ng-controller="SomeController">
<table st-table="items">
<thead>
<tr>
<th st-sort="color">Color</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in items">
<td>{{item.color}}</td>
</tr>
</tbody>
</table>
</body></html>
をクリックしてColors
th
も何も起こらず、データはソートされません。私は何が欠けていますか?ライブデモはこちら: http://jsbin.com/ganine/2/edit