I would like to append the browser url based on the view enabled in the same page.
Default URL: http://localhost:4200/xxx/disciplines
On click on the table row it will update like URL: http://localhost:4200/xxx/disciplines?disciplineId=1100
onRowClicked(event: any) {
this.isRowSelected = true;
this.selectedId = event.data.id; //event.id;
this.selectedItem = event;
console.log(this.selectedItem);
this.dataService.set(event);
this.router.navigate([], { queryParams: { disciplineId: this.selectedId } });
}
Can not we update the selected ID automatically without using
this.router.navigate([], { queryParams: { disciplineId: this.selectedId } });
How to append the new value like
http://localhost:4200/xxx/disciplines?disciplineId=1100&disciplineView=create
on clicking on some button.
If I use this this.router.navigate([], { queryParams: { disciplineView: view } });
url changed to
http://localhost:4200/xxx/disciplines?disciplineView=create
instead
http://localhost:4200/xxx/disciplines?disciplineId=1100&disciplineView=create
Expert advise please?