Skip to content

Instantly share code, notes, and snippets.

@edjasperdev
Created October 5, 2014 23:16
Show Gist options
  • Save edjasperdev/217325b8e3852dd61236 to your computer and use it in GitHub Desktop.
Save edjasperdev/217325b8e3852dd61236 to your computer and use it in GitHub Desktop.
Explaining Routes in Backbone
IdeaVoter.Routers.Ideas = Backbone.Router.extend({
routes: {
'': 'index',
'ideas/:id' : 'show'
},
index: function() {
//show me the index page
},
show: function(id) {
//show me idea number + id
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment