// Subscribe to search changes
this.subSearch = this.searchService.searchUpdated.subscribe(search => {
this.search = search;
+ // Reset pagination
+ this.pagination.currentPage = 1;
this.navigateToNewParams();
});
this.subSearch.unsubscribe();
}
- getVideos(detectChanges = true) {
+ getVideos() {
this.loading.next(true);
this.videos = [];
this.sort = <SortField>routeParams['sort'] || '-createdDate';
- this.pagination.currentPage = parseInt(routeParams['page']) || 1;
+ if (routeParams['page'] !== undefined) {
+ this.pagination.currentPage = parseInt(routeParams['page']);
+ } else {
+ this.pagination.currentPage = 1;
+ }
this.changeDetector.detectChanges();
}
"src/app/admin/admin.routes.ts",
"src/app/admin/friends/friend-list/friend-list.component.ts",
"src/app/admin/friends/friend-list/index.ts",
+ "src/app/admin/friends/friends.component.ts",
"src/app/admin/friends/friends.routes.ts",
"src/app/admin/friends/index.ts",
"src/app/admin/friends/shared/friend.model.ts",
"src/app/admin/friends/shared/friend.service.ts",
"src/app/admin/friends/shared/index.ts",
- "src/app/admin/friends/users.component.ts",
"src/app/admin/index.ts",
"src/app/admin/menu-admin.component.ts",
"src/app/admin/users/index.ts",