Skip to content

Instantly share code, notes, and snippets.

@siong1987
Created September 22, 2012 22:16
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 siong1987/3768015 to your computer and use it in GitHub Desktop.
Save siong1987/3768015 to your computer and use it in GitHub Desktop.
sample routes for forkbin
$(document).ready ->
routes =
"":
"NavbarRouter": "index"
"ListsRouter": "index"
"lists/:id":
"NavbarRouter": "index"
"ListsRouter": "show"
"lists/:id/forks":
"NavbarRouter": "index"
"ForksRouter": "index"
":username":
"NavbarRouter": "index"
"UsersRouter": "show"
Backbone.Routes.prefix = Forkbin.Routers
Backbone.Routes.map routes
Backbone.history.start
pushState: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment