reyesoft / ngx-jsonapi

JSON API client library for Angular 5+ 👌 :: Production Ready 🚀
https://ngx-jsonapi.reyesoft.com/
MIT License
101 stars 52 forks source link

Pagination zero indexed support #120

Closed NazarioLeonPerez closed 6 years ago

NazarioLeonPerez commented 6 years ago

Hi, i've noticed when using the integrated pagination feature that it does not support zero as start index which although it is not common practice is a possibility that should be considered. I found che in the "PathCollectionBuilder" class the following control if (params.page.number > 1) { this.addParam(Core.injectedServices.rsJsonapiConfig.parameters.page.number + '=' + params.page.number); } cause that the page param with 0 and 1 index will not be included.

pablorsk commented 6 years ago

This is for web browser cache reasons...

For example these URLs return same information:

But web browser make every request :/