In our Angular app, we are using query params. The params correlate to configuration settings, that can change often. Here's what we're currently using:
this.router.navigate([], {
relativeTo: this.activatedRoute,
queryParams: controlData,
queryParamsHandling: "merge" // preserve the existing query params in the route
});
This doesn't "navigate", BUT it does add to the browser history (if I double click on the browser back arrow, I'll see a long list of all the times I've made minor changes to the query params.
I don't want to add to the history, instead I'd like to use history.replaceState()
The only problem is, I need to translate that queryparam object to a route string. If I just try to use JSON.stringify(), it won't be correct because there's characters that the route doesn't except.
How can I convert this object of values to a route string?