Closed daniel-kozma closed 1 year ago
hello! thanks for the great report! I've done some testing and it apprears that this is an issue with the example. this is how the example work:
/hello/
input/hello/home
/hello/:name
route has a handler that checkes if :name
is home
/
/hello/home
/
again (and so you're stuck)this seems to be an issue with the way the example is designed rather than the router itself.
a better way to do this example would be:
instead of the checking the :name
in the handler, check it with alpine when the user press enter and redirect.
this way there wont be a /hello/home
in history:
<input @change="$router.redirect($event.target.value == 'home'? '/' : '/hello/' + $event.target.value)"` />
i made the example like this to demonstrate using different handlers but this usecase isn't that good i guess 😅
thanks alot for pointing it out! ill see if ill change the example. and ill be closing this issue since its not router related.
feel free to comment if you still have any issues or make another issue.
Describe the bug I have discovered a bug with back and forth navigation (the back and forth arrows) They don't always work
To Reproduce Steps to reproduce the behavior:
Screenshots
Environment