I need to add queryParams
dynamically to url without reloading page. So I carried out using the Location
service as below,
this.location.go(`${path}?tab=xxx`); // works perfectly without page reload
Now the problem is when I try to access the queryParams
it returns empty.
this.activatedRoute.queryParams.subscribe((qp) => {
console.log('updated queryParams', qp); // returns {}
});
whereas when the same code works if the page is reloaded properly. Any way to the same without refreshing the page in angular or should I try with native js?