Here is my route:
{ path: 'market/:currency', component: MainlayoutComponent, canActivate: [AuthGuard]}
I want redirect to with query params like this:
market/btc?sidebar=home
<a [routerLink]="['/market', currency]" [queryParams]="{sidebar: 'home'}"></a>
But when i click its redirect market/btc
What's the problem.
Editing
This code works i have another bug but i solved.
you just need to preserve your queryParams :
queryParamsHandling="preserve"
Add the above attribute/directive to your route :
<a [routerLink]="['/market', currency]" [queryParams]="{sidebar: 'home'}" queryParamsHandling="preserve"></a>