+ return params;
+ }
+
+ private loadRouteParams(routeParams) {
+ if (routeParams['search'] !== undefined) {
+ this.search = {
+ value: routeParams['search'],
+ field: <SearchField>routeParams['field']
+ };
+ } else {
+ this.search = {
+ value: '',
+ field: 'name'
+ };
+ }
+
+ this.sort = <SortField>routeParams['sort'] || '-createdDate';
+
+ this.pagination.currentPage = parseInt(routeParams['page']) || 1;
+
+ this.changeDetector.detectChanges();
+ }
+
+ private navigateToNewParams() {
+ const routeParams = this.buildRouteParams();
+ this.router.navigate(['/videos/list', routeParams]);