I have the following routes:
routes: {
'' : 'showSchedulePage',
'Assignment/:assignmentTitle' : 'showAssignment',
':pageType/:pageName' : 'showPage'
},
Instead of the same code being fired in each of these functions, how can I fire a function when the URL is ANY one of the ones up top?
Thanks!
Backbone plugin Routefilter allows you to define actions, which should be invoked before and after any route is executed. This allows you to extract common code from route handlers.