-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Description
Currently, matched parameters are passed into the action as an array
routes: {
"folder/:name-:mode": "openFolder"
},
openFolder: function(name, mode, queryString) {
// do stuff
}
I would like the actions to be given an object with name
, params
, queryString
instead, resembling express routing solution.
routes: {
"folder/:name-:mode": "openFolder"
},
openFolder: function(routeData) {
/* routeData is now
{
name: "openFolder",
params: {
name: "valueOfName",
mode: "valueOfMode"
},
queryString: "query=string&a=b"
}
*/
}
It could be an option that can be enabled on BB.Router.
Is it a good idea to have this functionality in base BB.Router? Or it can be an external library?
I have tried it out, and it seems to be working well, with a new set of tests cloned from current router test to make sure nothing breaks.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels