Programmatically adding routes to Backbone.Router?
问题 Here is my application-router.js file where i'm creating Backbone.Router object with just only few routes: var App = App || {}; App.Router = Backbone.Router.extend({ routes : { '' : 'showDashboard', // Not shown '*other': 'showModalError' }, defaultRoute : function(other) { $('#modal404').modal(); } }); In main javascript file application.js i'd like to programmatically add routes. I've tried with route() function and it doesn't work, routes are not added. It works however passing an object