From 33b68c463302e3f2a707ac0cf8a3cc003316435b Mon Sep 17 00:00:00 2001 From: Michael Bright Date: Wed, 22 Oct 2014 07:30:26 -0400 Subject: [PATCH] Fixed Router Callback Functions in "Organizing your application using Modules" Router callback functions need 'route' namespace to work correctly. --- _posts/2011-10-10-organizing-backbone-using-modules.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_posts/2011-10-10-organizing-backbone-using-modules.md b/_posts/2011-10-10-organizing-backbone-using-modules.md index 4f68ba31..e26404f4 100644 --- a/_posts/2011-10-10-organizing-backbone-using-modules.md +++ b/_posts/2011-10-10-organizing-backbone-using-modules.md @@ -247,7 +247,7 @@ define([ var initialize = function(){ var app_router = new AppRouter; - app_router.on('showProjects', function(){ + app_router.on('route:showProjects', function(){ // Call render on the module we loaded in via the dependency array // 'views/projects/list' var projectListView = new ProjectListView(); @@ -255,11 +255,11 @@ define([ }); // As above, call render on our loaded module // 'views/users/list' - app_router.on('showUsers', function(){ + app_router.on('route:showUsers', function(){ var userListView = new UserListView(); userListView.render(); }); - app_router.on('defaultAction', function(actions){ + app_router.on('route:defaultAction', function(actions){ // We have no matching route, lets just log what the URL was console.log('No route:', actions); });