Is it possible to have backbone.js’s routing feature determine multiple actions? for example, my single page app can have multiple tabs open with each tab doing different actions. Can this be done, and if so, how?
Is it possible to have backbone.js’s routing feature determine multiple actions? for example, my
Share
If I understand you correctly this can not be achieved out of the box as Backbones routing mechanism maps each route to a single callback. From the 0.9.1 docs
So if you need to pass multiple callbacks you need to override the route function to handle an array of callbacks – or you can post an issue at github to motivate its implementation.
A more pragmatic approach to your questions is of course to handle the mapping outside of the route definition, like