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

Ordering dynamically added routes? #96

Open
smitch88 opened this issue May 12, 2017 · 1 comment
Open

Ordering dynamically added routes? #96

smitch88 opened this issue May 12, 2017 · 1 comment

Comments

@smitch88
Copy link

smitch88 commented May 12, 2017

Situation:
I have initial routes set up on app load. I add some additional routes dynamically based on a configuration using add-route!. I noticed that since I defined a catch-all in the initial routes, namely /*, that this gets matched on before any of the dynamically added routes. I assume this is because the vector of routes is in insertion order?

Is there a way to handle dynamic ordering in the library that I'm not seeing? Or do I need to manipulate the *routes* directly for now?

@smitch88
Copy link
Author

smitch88 commented May 12, 2017

To anyone else with a similar issue...I ended up just adding an additional function prepend-route! that adds to the front of *routes* instead.

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

1 participant