hij1nx/SugarSkull — Issue #36: '/:page': ':page'
Author: maxogden
Created: 2011-10-30 17:52:14+00:00
State: open

Router({
'/:page': ':page'
}).use({
resource: {
pizza: function() { ... },
taco: function() { ... },
muffins: function() { ... }
}
})

this would be handy as it would save me from doing something redundant like this:

var pages = {
pizza: function() { ... },
taco: function() { ... },
muffins: function() { ... }
}

Router({
'/:page': {
on: function(page) {
pages[page]()
}
}
}).use({
resource: pages
})