Return to 1st page after new response returned by server
See original GitHub issue=======
Angular version: 6
ngx-pagination version: 3.2.0
Description of issue: I have a search result page, and your awesome pagination at its bottom, at the top of this page is a search input. My problem is: after user navigate to other page (after the 1st page), let say 6th page… then the user input another search arguments at search input then submit… the page doesn’t return to the 1st page after new list of results rendered. I already emptied the array that caused the paging but still doesn’t changed.
Steps to reproduce:
Expected result: Expected result is: after user navigate to other page than 1st… when ever the array that generates the paging at in the first place is emptied … the paging will reset to the 1st page.
Actual result:
Demo: (http://hargadil.com/search?q=iphone x
Any relevant code:
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)

Top Related StackOverflow Question
Gorgeous… thanks
Generally you shouldn’t need to inject the
PaginationService. This is intended for internal use within the library, which is why it is not even documented.It should be sufficient to bind to a variable on the component (
pin the simple example) and in yourngOnChangesmethod above, do: