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

Default route not working #466

Closed
YerkoPalma opened this issue Apr 4, 2017 · 7 comments
Closed

Default route not working #466

YerkoPalma opened this issue Apr 4, 2017 · 7 comments

Comments

@YerkoPalma
Copy link
Member

Expected behavior

Defining a route for '/404' should set a default route (not found)

Actual behavior

Default route did not work for me.

Steps to reproduce behavior

Set these routes

app.route('/', mainView)
app.route('/404', notFoundView)
app.mount('body')

Then visit any route different for '/', it will render mainView anyway.

I think it might be related with wayfarer#44.

@yoshuawuyts
Copy link
Member

yoshuawuyts commented Apr 5, 2017 via email

@expalmer
Copy link

expalmer commented May 5, 2017

What about app.route('/*', notFoundView)... It works for me

@YerkoPalma
Copy link
Member Author

@expalmer just tried that, and it works as a default view. IMO this is still a workaround more than a solution, but is good to know.

@YerkoPalma
Copy link
Member Author

@yoshuawuyts looks like in choo@6 the wildcard route will be the only default, so I think this issue can be closed now 👍

@yoshuawuyts
Copy link
Member

yoshuawuyts commented Jun 29, 2017 via email

@YerkoPalma
Copy link
Member Author

I'm saying that this PR #521 resolves this issue. Am I wrong?

@yoshuawuyts
Copy link
Member

I think this should be resolved, yeah - but not entirely positive because we need a test to see if '/*' and '/' resolve differently on root. PR welcome over on bankai for the test https://github.com/yoshuawuyts/wayfarer/blob/master/test/router.js

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

No branches or pull requests

3 participants