I would like to pass an array ids: [1, 2, 3] to router query string like this: http://...some-url?ids=1&ids=2&ids=3, but when I try to use
const queryParams = { ids: [1, 2, 3] };
this.router.navigate(['/some-route'], { queryParams });
the result is http://...some-url/some-route?ids=1%2C2%2C3
Is there a way to add query params with the same key?
this.router.navigate(['/some-route'], queryParams );(remove the{})navigate(commands: any[], extras?: NavigationExtras), andextrasis object witch can contains queryParams object. I can writethis.router.navigate(['/some-route'], { queryParams: {ids: [1, 2, 3]} });, but I like short form. (I triedthis.router.navigate(['/some-route'], queryParams ), it doesn't work)