Issue
Does Angular support sending multiple values for a single query parameter. In theory it should as it provides convertToParamMap
method that can get all values for a single parameter.
I was trying to use the following syntax in my html template:
<a [routerLink]="['/first-component']" [queryParams]="{param1:'value1, value2'}" routerLinkActive="active" >First Component</a>
... however the value 'value1, value2'
always comes as one value - not two as I would want it to.
My question is : What is the correct syntax for that?
Solution
Should probably be an array of strings like:
[queryParams]="{param1:['value1', 'value2']}"
Answered By - 0xBobby
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.