-
Notifications
You must be signed in to change notification settings - Fork 95
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
handlers to "*" cover all next handlers to anything #51
Comments
The order of route definitions is important. As you can see in the hashChange listener, the routes are evaluated in order, and the first match is executed.
So what you need to do probably is to register the wildcard route last. |
This means that there can be only one listener per route? Wouldn't it be better to allow more routes? |
Hmm, one listener per one route imho makes sense. What's the use case where you want more listeners? You can wrap your listener in another function if you want to do more stuff under one listener. |
Some use cases could be a function that fires for all routes (and do something useful) and then a separated function (that do something else useful) for any other possible route |
When an handler as added to "*" and then an handler is added to everything else, "*" handlers have priority even I think it's not supposed to be so.
The text was updated successfully, but these errors were encountered: