Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

How to add bookmarks in html when using svelte-spa-router?

$
0
0

For many reasons, I can't use Sveltekit. So I'm using svelte-spa-router for my SPA.

The way you use the router is by adding hyperlinks like <a href="#about"/>. That makes the url www.domain.com/#about and mounts the respective component.

The issue is that, this is hijacking the default bookmark behavior. What do I do if I wanted the default behavior? I.e, to scroll down to a section with the id="about" on clicking an anchor element?

Appreciate your help.


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>