Open andreujuanc opened 7 years ago
Just did it myself, subscribing to routed.add and:
var processRequest = function(params){
var request = {
};
params.route._paramsIds.forEach(function(paramId, index) {
request[paramId] = params.params[index];
}, this);
return request;
};
But there is a problem, im using _paramsIds , and it's suposed to be private. is this the only way to do it?
Hello!
As title says, is there a way to get the callback parameters as one object, instead of separated function arguments?
What we have now:
myRouteCallback(id, name)
What I was thinking it would help me a lot:
myRouteCallback(param) { param.id .. param.name..
Cheers