Like Django {{ url }} , is there a way or way to access a specific route by passing it a name and variables.
// example Router var router = Backbone.Router.extend({ routes: { '!/user/:user_id': 'editUserAction', '!/': 'homeAction' }, editUserAction(user_id) { // edit user view }, homeAction() { // home view } });
Some methods like
router.reverse('editUserAction', '5');
Would return a hash:! !/user/5
router.reverse('homeAction');
Would return a hash:! !/
dlrust
source share