Created
October 19, 2011 17:46
-
-
Save dunkfordyce/1299082 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this works | |
Router = new Backbone.Router({ | |
routes: { | |
'': 'accounts', | |
'accounts/:account_id': 'accounts', | |
'accounts/:account_id/campaigns': 'accounts', | |
'accounts/:account_id/campaigns/:campaign_id': 'accounts' | |
}, | |
accounts: function() { | |
console.log('accounts', arguments); | |
} | |
}); | |
// but the docs say it should be: | |
Router = new Backbone.Router.extend({ | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment