Hi folks, I came across a scenario and wanted to know if its the default behaviour and if there are any work around for this scenario.
I have a nav bar in which the different nav links are elements. In this nav bar, I have two nav links that have the same route, but one of them alone has a query param.
e.g.
<LinkTo @route="A">Route A</LinkTo>
<LinkTo @route="A" @query={{hash type="sampleType"}}>Route A - Sample Type</LinkTo>
The issue I am facing is that, when I click on the second LinkTo element the url of the first LinkTo element becomes the same as the second one.
E.g. http://baseurl.com/A?type=sampleType
Is this a common behaviour, is there any workaround for this?
Currently I am using anchor tags by setting the urls, to overcome this behaviour. I didn’t want to use actions to redirect, as I wanted the users to be able to use ctrl + click to open links in new tabs if needed.
1 post - 1 participant