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:
parent
68f832d776
commit
834dd02610
2 changed files with 25 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue