Is it possible to change a single route parameter in the current route, while keeping all the other parameters? This is for use in a paging component, which will route to a new
you can use query parameter option instead of parameter it is use like
in calling component
const navigationExtras: NavigationExtras = {
queryParams: { 'param_id': 1, 'param_ids': 2, 'list':[1,2,3] },
};
this.router.navigate(['/path'], navigationExtras);
in the called component
this.route.queryParamMap.map(params => params.get('param_id') ||
'None').subscribe(v => console.log(v));
this.route.queryParamMap.map(params => params.get('param_ids') ||
'None').subscribe(v => console.log(v));
this.route.queryParamMap.map(params => params.getAll('list') ||
'None').subscribe(v => console.log(v));