define(['jquery','underscore','backbone', 'views/manage_pages'], function($, _, Backbone, ManagePages) { var AppRouter = Backbone.Router.extend({ routes:{ '/new_page': "showPageForm", '/edit_page': "showPageEditForm", '*actions': "showPageForm" }, }); var initialize = function(){ appRouter = new AppRouter; appRouter.on("route:showPageForm", function(){ console.log('hej'); }); appRouter.on("route:showPageEditForm", function(){ console.log('ho'); }); var page_form = new ManagePages(); Backbone.history.start(); } return { initialize: initialize } }); Backbone.history.start({ pushState: true });