backbonetutorials
backbonetutorials copied to clipboard
Wrong tutorial, missing an argument in a function...
At http://backbonetutorials.com/organizing-backbone-using-modules/
define([ 'jquery', 'underscore', 'backbone', 'views/projects/list', 'views/users/list' ], function($, _, Backbone, Session, ProjectListView, UserListView){
Is wrong because the Session is not loaded.
Also in the same page: http://backbonetutorials.com/organizing-backbone-using-modules/
app_router.on('showProjects', function(){
should be
app_router.on('route:showProjects', function(){
see more here: http://stackoverflow.com/questions/14410242/backbone-router-doesnt-work-with-requirejs
Ok yes, good catch. Thomas just needs to fix the tutorial to match the source - just remove Session and add the route as you described.
It's actually correct in the github source ;-D
Actually... would you mind updating the code yourself? Then make a pull request and you'll get a nice contribution credit.