Closed mrozbarry closed 7 years ago
As a summary, with our new app, if our routes are like this:
routes: {
'things': 'renderThings',
'things/:id': 'renderThing'
}
And we hit the url http://project.com/app.html#!/things
, it works, but if our routes look like this:
routes: {
'/things': 'renderThings',
'/things/:id': 'renderThing'
}
Hitting the same url from above does not work, and calls notFound('/things').
Hi @mrozbarry, sorry it took us a bit to get back to you, I'm helping Larry triaging the issues. I would say it's expected for version 2.0 not to be backward compatible with version 1.7, hence I'm closing this. Feel free to open a new issue if I missed something and the problem is still relevant to you.
The company I work for is currently developing two applications, one that is using mini router
^1.7.0
and a new one that is using^2.0.0
.With the 1.7.0 app, we are not using push state, and set our routes like:
This works as expected, but in our new
^2.0.0
based app, it does not.The new application is a static application that launches from
app.html
, so our router properties look like this:We have wrapped our render like this:
But when we specify a url in a link, the router does not catch it and removes
app.html#!
from our url, which breaks our application. Furthermore, we added anotFound: function (path) {}
method, which detects all of our urls to be wrong if the defined route starts with a backslash.We did not have this behaviour in
^1.7.0
and were wondering if there was some sort of regression, or if this is a feature that isn't documented properly.Thanks for any help.