I am trying to update (add, remove) queryParams from a component. In angularJS, it used to be possible thanks to :
$location.search(\'f\', \'filters[]\'); //
I ended up combining urlTree with location.go
const urlTree = this.router.createUrlTree([], {
relativeTo: this.route,
queryParams: {
newParam: myNewParam,
},
queryParamsHandling: 'merge',
});
this.location.go(urlTree.toString());
Not sure if toString can cause problems, but unfortunately location.go, seems to be string based.