Defining a route for '/404' should set a default route (not found)
Default route did not work for me.
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.
Oh yeah sounds like it. Oops haha
On Tue, Apr 4, 2017 at 8:01 PM Yerko Palma notifications@github.com wrote:
Expected behavior
Defining a route for '/404' should set a default route (not found)
Actual behaviorDefault route did not work for me.
Steps to reproduce behaviorSet 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
https://github.com/yoshuawuyts/wayfarer/issues/44.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/yoshuawuyts/choo/issues/466, or mute the thread
https://github.com/notifications/unsubscribe-auth/ACWlesXR3OmFeLUTLXY7q7Meku4HJ-_dks5rsoVtgaJpZM4MzN9M
.
What about app.route('/*', notFoundView)... It works for me
@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.
@yoshuawuyts looks like in choo@6 the wildcard route will be the only default, so I think this issue can be closed now :+1:
woot!
On Thu, Jun 29, 2017 at 11:40 PM Yerko Palma notifications@github.com
wrote:
@yoshuawuyts https://github.com/yoshuawuyts looks like in choo@6 the
wildcard route will be the only default, so I think this issue can be
closed now 👍—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/yoshuawuyts/choo/issues/466#issuecomment-312116349,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACWleitlogZ2elNd991FqJV8fS_39LXbks5sJBnBgaJpZM4MzN9M
.
I'm saying that this PR #521 _resolves_ this issue. Am I wrong?
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