So, basicaly I have a route to which I have to pass a few values, but they are all regarding the same parameter. This is the URL I wish to navigate to:
http://localhost:4200/home/path?status=1&status=5
I tried to set the routing through router.navigate(), but this is not allowed since it's regarding the same parameter (An object literal cannot have multiple properties with the same name):
this.router.navigate(["/home/path"], {
queryParams: { status: '1', status: '5'},
});
Thanks in advance for any advices and suggestions
So the solution was pretty much under my nose, as I replied to @derstauner:
I can pass the queryParams as an array. So simply by stating that status=[1,5], the redirecting works fine:
this.router.navigate(["/home/path"], {
queryParams: { status: [1,5]},
});