Hello,
I have a problem. I will get the Content Range from the header for my
pagination.
Thats the code snippet from the backend:
@Path("/pois")
...
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getAll(
...
@ApiParam(value = "Offset", required = false, defaultValue = "0")
@QueryParam("offset") Optional<Integer> offset,
@ApiParam(value = "Size", required = false, defaultValue = "20")
@QueryParam("size") Optional<Integer> size,
@ApiParam(value = "Search text", required = false)
@QueryParam("query") String query)
{
return super.getAll(login, offset.or(0), size.or(20), query, "name",
"description");
}
How can I access on the content range header? Because when I add new Items
the pagination have to continue the page sizes.
I had an idea but it doesn't work:
var dataList = function () {
$http({
url: $resource(apiHost + '/:resource/', {
resource: $scope.resourceType + 's'
}),
method: 'GET'
}).success(function (data) {
$scope.liste = data;
});
Normally I could access with liste.size but I don't get the value of the
variable size.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.