How to use arrays in routes with Angular?
The getAll()
method returns duplicate parameters as an array.
Example:
http://www.example.com/?query=a&query=b&query=c
The value would be:
console.log(params.getAll('query')); // prints ["a","b","c"]
All query parameters in the HTTP specification are strings.
It works if use routerLink
.
But, it's not currently working with your approach.
A bug in Angular's git is already open at https://github.com/angular/angular/issues/19179 for the same. You can track this issue there.