fix back button on default route trigger

This commit is contained in:
Leo Horie 2016-07-15 01:22:34 -04:00
parent a2680b30a4
commit 084d99f125
2 changed files with 42 additions and 3 deletions

View file

@ -22,8 +22,8 @@ module.exports = function($window, renderer, pubsub) {
else {
renderer.render(root, Node(payload, null, args, undefined, undefined, undefined))
}
}, function() {
router.setPath(defaultRoute)
}, function(path, params) {
router.setPath(defaultRoute, null, {replace: true})
})
autoredraw(root, renderer, pubsub, replay)
}
@ -31,6 +31,6 @@ module.exports = function($window, renderer, pubsub) {
route.prefix = router.setPrefix
route.set = router.setPath
route.get = router.getPath
return route
}