feat: bring back m.route.params()

Because it's annoying only having route params available to the
top-level components within a route.
This commit is contained in:
Pat Cavit 2017-01-11 14:23:42 -08:00
parent 68f832d776
commit 834dd02610
2 changed files with 25 additions and 0 deletions

View file

@ -54,6 +54,10 @@ module.exports = function($window, redrawService) {
route.set(href, undefined, undefined)
}
}
route.params = function(key) {
if(typeof attrs !== "undefined" && typeof key !== "undefined") return attrs[key]
return attrs
}
return route
}