Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Update: pagination persist on page reload #269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ArslanAmeer
Copy link

@ArslanAmeer ArslanAmeer commented Oct 2, 2023

Issue:
The ArticleListComponent would reset to the first page on reloads, losing the current pagination state.

Solution:
Leveraged Angular's ActivatedRoute and Router services to keep the pagination state in sync with a page query parameter in the URL. Now, on initialization, the ArticleListComponent reads the page query parameter to set the initial page, and updates the URL query parameter as the user navigates through the pagination controls. This ensures the current pagination state is retained across reloads or navigation to other pages and back.

@EricSimons @geromegrignon

@geromegrignon
Copy link
Contributor

That's a great idea I ant to push for the project but this repository is just an implementation. We need to firstly update the specs.

@ArslanAmeer
Copy link
Author

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants