<a href="#"
[routerLink]="[isTrue?'/location-1':'/location-2', '']"
[queryParams]="{id:loc.id,l:'loc'}">
Here when value of isTrue
is true
/location-1/?id=1&l=loc
But when value of isTrue
is false
, I need
/location-2/?id=1&l=loc2&idL=2
So how do I modify parameter conditionally?