Skip to content

Instantly share code, notes, and snippets.

@kwbock
Last active December 16, 2015 07:08
Show Gist options
  • Select an option

  • Save kwbock/5396230 to your computer and use it in GitHub Desktop.

Select an option

Save kwbock/5396230 to your computer and use it in GitHub Desktop.
$(function($) {
var MainController = App.Controllers.MainController = {
index: function() {
console.log("in MainController#index");
},
show: function(id) {
console.log("in MainController#show", id);
}
}
});
$(function($) {
'use strict';
var MainRouter = App.Routers.MainRouter = Backbone.Router.extend({
routes: {
'': App.Controllers.MainController.index,
'show/:id': App.Controllers.MainController.show
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment