Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Router Callback Functions in "Organizing your application using Mo... #116

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _posts/2011-10-10-organizing-backbone-using-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,19 +247,19 @@ 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();
projectListView.render();
});
// 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);
});
Expand Down