189
rated 0 times
[
190]
[
1]
/ answers: 1 / hits: 19782
/ 12 Years ago, sat, january 5, 2013, 12:00:00
Does AngularJS have Limit and Offset request methods when calling an external data resource that supports them?
I imagine there is a more elegant solution than this, where I am passing the limit and offset via the routeParams:
function ListCtrl($scope, $http, $routeParams) {
$http.jsonp('http://www.example.com/api/list.jsonp?callback=JSON_CALLBACK&limit=' + $routeParams.limit + '&offset=' + $routeParams.offset,{callback: 'JSON_CALLBACK'}).success(function(data) {
$scope.list = data;
});
}
More From » angularjs