Closed
Description
Hi, this was my scenario:
- route initialized with history option true and root option set to /en like this:
router = new Router({
history: true,
root: utils.lang
});
-
navigating from homepage ( /en ) to contact ( /en/contact )
-
clicking back button for come back to homepage ( /en ) matches default '404' route ( * )
after some tries and investigations i think i've found a little bug in /src/history/html5.js p.start method where this.listener function loses its context. i resolve binding the function to this
this.listener = function (e) {
var url = decodeURI(location.pathname + location.search)
if (this.root) {
url = url.replace(this.rootRE, '')
}
self.onChange(url, e && e.state, location.hash)
}.bind(this);
Metadata
Metadata
Assignees
Labels
No labels