When trying to use queryParams
for navigation in Angular routing, I encountered an issue.
<a routerLink='/master' [queryParams]="{query:'%US',mode:'text'}"><li (click)="search()">Search</li></a>
The desired URL to navigate to was:
http://localhost:4200/master?query=%US&mode=text
However, upon clicking on search, the actual navigated URL turned out to be:
http://localhost:4200/master?query=%25US&mode=text
I am unsure why the extra 25
is added after the %
symbol. Any suggestions on a cleaner way to navigate correctly would be appreciated.