Skip to content

Instantly share code, notes, and snippets.

@KrofDrakula
Created September 7, 2011 09:19
Show Gist options
  • Save KrofDrakula/1200134 to your computer and use it in GitHub Desktop.
Save KrofDrakula/1200134 to your computer and use it in GitHub Desktop.
Backbone = require 'backbone'
class Router extends Backbone.Router
routes:
':module/*path' : 'dispatch'
dispatch: (module, path) =>
console.debug module, path
### Init code
$ = require 'jquery'
Backbone = require 'backbone'
Router = require './shared/router'
$ ->
router = new Router
Backbone.history.start() # Errors out in Backbone.history where binding to 'hashchange' event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment