You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The codes are working but the problem is, when I have the href like <a href="/#anchor">Anchor</a>, it does not seem to work with my codes. If I have the same without the forward slash, it works like <a href="#anchor">Anchor</a>.
When visit new route (/contact-us) - it loaded as base_url/contact-us#anchor and never works because the #anchor section inside home page.
I am using vue-router.
Any help will be appreciated.
The text was updated successfully, but these errors were encountered:
Hi, just came across this issue. I faced a similar challenge in a nuxt 3 app. My solution was to add an event listener that would look at the route hash parameter, then programatically scrollTo the target (see below)
The codes are working but the problem is, when I have the href like
<a href="/#anchor">Anchor</a>
, it does not seem to work with my codes. If I have the same without the forward slash, it works like<a href="#anchor">Anchor</a>
.When visit new route (/contact-us) - it loaded as
base_url/contact-us#anchor
and never works because the #anchor section inside home page.I am using vue-router.
Any help will be appreciated.
The text was updated successfully, but these errors were encountered: