Open
Description
When root
isn't set to "/", I've noticed some unexpected behaviour with regard to the root url when it has a query string.
An example:
const Router = AmpersandRouter.extend({
routes: {
"": "index",
"(*path)": "catchAll"
},
index() {
//never fires
},
catchAll(path, query) {
console.log(pathname);//path results in the query string instead
}
});
const router = new Router();
router.history.start({
pushState: true,
root: "/app"
});
When starting the page at, say /app?foo=bar
, path
incorrectly results in "foo=bar"
, which isn't right. router.history.fragment
also reports "foo=bar"
.
However, staring the page at /app/second?foo=bar
, path
correctly results in "/second"