Może spróbuj za pomocą ng-show ustawić zakres dla "widzianego" indeksu (indeksów) np.
ng-repeat="question in questions"
ng-show="( $index >= first_visible && $index <= last_visible )"
app.controller('questionsCtrl', function($scope, $http) {
$http.get('https://jsonplaceholder.typicode.com/albums')
.then(function (response) {
$scope.questions = response.data;
$scope.first_visible = 0;
$scope.last_visible = 2;
});
// ...
)};
i za pomocą np.
<button ng-click="moveBack()">Back</button>
<button ng-click="moveForward()">Forward</button>
"przesuwać" zakres
$scope.moveBack = function() {
if ($scope.first_visible >= 3) {
$scope.first_visible -= 3;
$scope.last_visible -= 3;
}
};
$scope.moveForward = function() {
if ($scope.last_visible + 3 < $scope.questions.length) {
$scope.first_visible += 3;
$scope.last_visible += 3;
}
};
przykład on-line ( plik użyty w przykładzie ).