Skip to content

Instantly share code, notes, and snippets.

@monzou
Last active December 17, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monzou/5641088 to your computer and use it in GitHub Desktop.
Save monzou/5641088 to your computer and use it in GitHub Desktop.
My little Backbone.js framework's Router sample.
class UsersRouter extends ResourceRouter
path: "users"
layout: "#contents"
routes:
":id": "show"
show: (id) ->
new User({id: id}).fetch success: (model) =>
@layoutView ShowView,
model: model
bundles:
users: UsersBundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment