我无法对我的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'}];
}]);
Run Code Online (Sandbox Code Playgroud)
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>
Run Code Online (Sandbox Code Playgroud)
如果单击Colors th,则没有任何反应,数据也不会排序.我错过了什么?现场演示:http://jsbin.com/ganine/2/edit