I am trying to display a table with a large set of elements. I want to paginate pages and only load the elements that appear on the current page. Now json loads using $resource .
I read here that itβs nice to pass the pagination information (currentPage, pagesCount and elementsCount) inside the json header.
How can I access the information that is in the json header from angular?
Here is the basic js structure:
angular.module('App.services', ['ngResource']). factory('List', function($resource){ return $resource('url/of/json/:type/:id', {type:'@type', id:'@id'}); }); angular.module('App.controllers', []). controller('ListCtrl', ['$scope', 'List', function($scope, List) { var $scope.list= List.query({offset: 0, limit: 100, sortType: 'DESC' }); }]);
angularjs
FranΓ§ois Romain Jul 04 '13 at 0:03 2013-07-04 00:03
source share