Make m.route.param() return all params #737
This commit is contained in:
parent
7a5980631e
commit
caf1138c31
2 changed files with 24 additions and 0 deletions
|
|
@ -958,6 +958,9 @@ var m = (function app(window, undefined) {
|
|||
};
|
||||
m.route.param = function(key) {
|
||||
if (!routeParams) throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");
|
||||
if( !key ){
|
||||
return routeParams;
|
||||
}
|
||||
return routeParams[key];
|
||||
};
|
||||
m.route.mode = "search";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue