6

I want to have route something like this : www.test.com?procesId=12 .

This is my current routerLink:

But right now i get this value :

www.test.com/123

Any suggestion how can i add in url ?procesId = 12 with routerLink ?

I tried:

But i dont get question mark in url and also i get an error:

Cannot match any routes.

I know that i can get question mark when i use params but i want to use it with routerLink, because thats the way they use it on this project.

None
  • 8,817
  • 26
  • 96
  • 171

1 Answers1

16

you can use query params in routerlink like below

[routerLink]="['']" [queryParams]="{ procesId : 12 }"
Arun Kumaresh
  • 6,211
  • 6
  • 32
  • 50