We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
page
1 parent 606067b commit 13db3e6Copy full SHA for 13db3e6
src/app/components/paginator/paginator.component.ts
@@ -138,13 +138,13 @@ export class PaginatorComponent implements OnInit {
138
139
private addRouteListener(): void {
140
this.route.queryParamMap.subscribe((params) => {
141
- const page = params.get('page');
142
- if (page) {
143
- this.currentPage = parseInt(page, 10);
144
- this.pageChanged.emit(this.currentPage);
145
- } else {
146
- this.changePage(1);
+ let page = params.get('page');
+ if (!page) {
+ // Set page to 1 without triggering query param or navigation
+ page = '1';
147
}
+ this.currentPage = parseInt(page, 10);
+ this.pageChanged.emit(this.currentPage);
148
});
149
150
0 commit comments