带有服务器端加载的AngularJS ngTable
我尝试使用ngTable进行服务器端排序和分页 html:带有服务器端加载的AngularJS ngTable,angularjs,ngtable,Angularjs,Ngtable,我尝试使用ngTable进行服务器端排序和分页 html: <table ng-table="dataTable" class="table table-striped"> <tr ng-repeat="row in $data"> <td data-title="'Name'" sortable="'name'">{{row.name}} </td
<table ng-table="dataTable" class="table table-striped">
<tr ng-repeat="row in $data">
<td data-title="'Name'" sortable="'name'">{{row.name}}
</td>
</tr>
</table>
getData函数在页面更改中被调用,工作正常。但是sort只是对页面进行排序,而不是调用getData。我可以使用此指令满足mu的需要吗?我建议您使用material table谢谢,我更喜欢使用ngTable,因为它是使用它的大型web应用程序的一部分
$scope.dataTable= new ngTableParams({
page: 1,
count: 10,
sorting: {
name: 'desc'
}
}, {
counts: [],
total: 0,
getData: function($defer, params) {
... httpGet according to the params, server returns just the relevant for selected
page
}
});