-
Notifications
You must be signed in to change notification settings - Fork 486
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
catch all or redirect #335
Comments
you can config router with '/:def' tag like {'/:def': defaultPage} |
Currently I am doing:
How would I use '/:def' with this approach, in other words I tried you suggestion and it did not work in the way I am initializing a router. |
A catch all that worked for me: Router(self.routes())
.configure({
on: ns.view.table['all routes']
})
.init('/'); … and later in my routing table: '/?((\w|.)*)': ns.view.table['catch all'], // Catches all non-specified routes.
'/': ns.view.table['splash screen'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe I have missed the obvious, but how can I implement a catch all route? I currently have a number of routes, but I want that for any url that does not match one of my routes to be caught and sent to a default page.
The text was updated successfully, but these errors were encountered: