正在寻找类似的东西ng-repeat="data in dataset" ng-repeat-steps="500"
却一无所获。在这方面的最佳做法是什么?
可以尝试下这个代码:
<table>
<tr ng-repeat="d in data | limitTo:totalDisplayed"><td>{{d}}</td></tr>
</table>
<button class="btn" ng-click="loadMore()">Load more</button>
//the controller
$scope.totalDisplayed = 20;
$scope.loadMore = function () {
$scope.totalDisplayed += 20;
};
$scope.data = data;