backbonetutorials icon indicating copy to clipboard operation
backbonetutorials copied to clipboard

Wrong tutorial, missing an argument in a function...

Open totty90 opened this issue 11 years ago • 2 comments

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

totty90 avatar Sep 23 '13 15:09 totty90

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

headwinds avatar Sep 23 '13 15:09 headwinds

Actually... would you mind updating the code yourself? Then make a pull request and you'll get a nice contribution credit.

headwinds avatar Oct 20 '13 13:10 headwinds