question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pagination and X-Total-Count

See original GitHub issue

I’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.

schermata 2015-01-06 alle 14 24 00

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:closed
  • Created 9 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
romankhymychcommented, Apr 11, 2020

http .get<any>(‘url’, {observe: ‘response’}) .subscribe(resp => { console.log(resp.headers.get(‘X-Total-Count’)); });

0reactions
anerivalacommented, Oct 5, 2017

screen shot 2017-10-05 at 12 48 32 pm screen shot 2017-10-05 at 12 34 07 pm I can’t get x-pagination-total-count what to do??

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found