As an Angular user, I am trying to populate a query parameter with a JSON object.
<ngx-datatable-column name="Sku" prop="product.sku" [flexGrow]="0.5">
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
<a [routerLink]="['/general','products']" [queryParams]="{q: { search: value } }">
{{value}}
</a>
</ng-template>
</ngx-datatable-column>
The code above generates the link:
http://localhost:4200/general/products?q=%5Bobject%20Object%5D
Instead of
http://localhost:4200/general/products?q={"search": "SomeSearchValue"}
. (html escape of course.)
Any ideas on how to resolve this issue?
EDIT:
<a [routerLink]="['/general','products']" [queryParams]="{q: { search: value }.toString() }">
The above solution does not seem to work.