I'm using Angular 7. I'm trying to navigate to one of the defined urls, passing query parameters:
this.router.navigate(['/someurl'], {queryParams: {r: id}});
as a result of this call, application navigates to localhost:4200/someurl?r=25.
This looks good so far, but after I refresh page the url changes to localhost:4200/someurl%3Fr%3D25 and that leads to this error in console:
Error: Cannot match any routes. URL Segment: 'someurl%3Fr%3D25'
How can I force my application (or browser) not to substitute special symbols ('?' and '=' in my example)? I know that it is a cause of my error, but I don't know how to prevent it.