pateketrueke / yrv

Your routing vibes! (for Svelte)
https://svelte.dev/repl/0f07c6134b16432591a9a3a0095a80de
161 stars 9 forks source link

How to use hash based routes #54

Closed AndreasHald closed 4 years ago

AndreasHald commented 4 years ago

I have a simple route setup, that i can't get to work.

/foos /foo/:id

``

404 Not found

``

Foos is a list Foo refers to a specific item.

When i'm on a specific item i would like to use fragment based routing to allow the user to scroll to certain items on the page, however the router thinks it's a route attempt and redirects to the fallback.

so /foo/123#someItem takes me to the fallback route

how do i define the route for foo so that it optionally can have a fragment parameter? and stays on the same component?

pateketrueke commented 4 years ago

Oh my fault, it was a bug I closed few weeks ago but never released, sorry for that.

Please upgrade to the 0.0.31 version, it fixes the default anchor behavior.

AndreasHald commented 4 years ago

I seem to be having an issue on 0.0.31 any ideas what could cause this?

Screenshot 2020-09-23 at 19 13 09

pateketrueke commented 4 years ago

You're right, my fault again, let me figure out what happened!

pateketrueke commented 4 years ago

Please try again, It seems to still failing on the Svelte REPL, but may works for you, please let me know!

AndreasHald commented 4 years ago

0.0.32 runs successfully, unfortunately nothing is rendered on any route.

pateketrueke commented 4 years ago

Yeah, I found the root-cause, is a thing of the building setup — I almost fixed it last night, I think it'll be ready soon...

pateketrueke commented 4 years ago

Fixed on v0.0.33 — feel free to open a new issue if this is not working as you're expecting, thank you!