Using backbone.js, is it possible to chain Url routes?
if I have something like that:
routes: {
"home*splat":"showHomeView",
"home/view_:param":"handleViewChange"
}
I’d like to be able to say something like …/#home/view_gallery and both handlers to fire in the order in which they were declared.
This however, fires only the first handler.
The router runs through the
keysofroutesin order, and for the first one that matches, calls theRouter[value].apply(params), and then stops.So, no, URL routes will not chain. One route per URL hash change event.