pagination and X-Total-Count
See original GitHub issueI’ve modified my REST server to provide the X-Total-Count header as described in the ng-admin doc, but it seems restangular somehow doesn’t handle it correctly.
as you can see chrome shows the header, but ng-admin doesn’t recognize it. I’ve added this function to the listview:
listView.totalItems(function(response) {
console.log(JSON.stringify(response.headers()));
return response.headers('X-Total-Count');
});
and it shows just these headers:
{"date":"Tue, 06 Jan 2015 13:20:45 GMT","content-length":"12373","content-type":"application/json"}
is there a solution or a workaround for this? I’ve checked my code to see if I accidentally set some wrong configuration but I really can’t figure it out… any help is really appreciated 😃
Issue Analytics
- State:
- Created 9 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Better way for Getting Total Count along with Paging in SQL ...
I have requirement to get the total count of records along with paging. At present I am doing it as listed below in...
Read more >SQL – Best way to get Total Count with pagination
The key point here is using Count(*) Over which allows getting list and total count at a single query. Select *, Count(*) Over...
Read more >Pagination And Total Number Of Rows From One SELECT
Pagination And Total Number Of Rows From One SELECT · 1. Using COUNT(*) OVER(). Transact-SQL 1. 2. 3. 4. 5. 6. 7. 8....
Read more >Paging in SQL Server Stored Procedure with Total Row Count
The records with Row Number (Row Index) are inserted into a TEMP Table (Temporary Table) and then the results are filtered based on...
Read more >How to get total count of records and pagination data ... - Reddit
Prepare the query I want to pagínate. Run a count of rows using Count() or CountAsync(). Run the final pagination by Skip/Take the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
http .get<any>(‘url’, {observe: ‘response’}) .subscribe(resp => { console.log(resp.headers.get(‘X-Total-Count’)); });