Reputation: 1
Does anyone know how you would hyperlink to another svelte component from your app component? I need to build a functional navbar with svelte and I'm pretty stuck right now
I tried looking for the svelte:component/ tag from the tutorial but I don't know how exactly I should be able to do it with that as my navbar is not a select tag, rather a list.
Upvotes: 0
Views: 616
Reputation: 597
I think what you want is to implement Routing - this is the mechanism for mapping URLs to Svelte pages / components in a single page app.
The svelte-routing module is the most popular way of doing this, but there are other routing frameworks for Svelte that have their place in certain circumstances.
The info on the svelte-routing github page has good info on how to set it up: https://github.com/EmilTholin/svelte-routing
Upvotes: 1