Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash routes in 8.10.0 #283

Open
gilphilbert opened this issue Mar 16, 2021 · 5 comments
Open

Hash routes in 8.10.0 #283

gilphilbert opened this issue Mar 16, 2021 · 5 comments

Comments

@gilphilbert
Copy link

I was using 8.9.1, which worked well except I was getting double entries in my history (and navigating "back" was a little odd...) so I upgraded to 8.10.0. Now my history works well... but that's because hash routing isn't working at all!

I haven't changed anything:

<ul class="menu-list has-text-centered">
    <li><a href="/" data-navigo>Playing</li>
    <li><a href="/playlists" data-navigo>Playlists</li>
    ...
</ul>
self.router = new window.Navigo('/', { hash: true })
self.router
  .on('/playlists', () => {
    // do some stuff
  })

It seems like Navigo isn't intercepting the routes as they're acting like normal anchors and redirecting the page. If I turn off hash-based routing it works exactly as expected.

Any suggestions?

@krasimir
Copy link
Owner

This seems like a bug. I'll investigate.

@krasimir
Copy link
Owner

Can you please try the new 8.10.1.

@gilphilbert
Copy link
Author

Just tried the new version: hash-based routing works again... but now I'm getting three entries in my history per route. I checked with a simple console.log and the event is only firing once.

@krasimir
Copy link
Owner

Yep. This must be fixed. I suspect that it's like that for long time.

@krasimir
Copy link
Owner

Hey, sorry for the delay. The problem should be fixed in the latest 8.11.1 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants