Created
November 18, 2011 16:44
-
-
Save mikeobrien/1376995 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Flap extends Backbone.Model | |
class TimelineCollection extends Backbone.Collection | |
model: Flap | |
TimelineController = | |
enumerate: (handle) -> | |
console.log 'enumerate ' + handle | |
@timeline.reset '{{ name: \'you\'}, { name: \'me\'}}' | |
class TimelineRouter extends Backbone.Router | |
routes: | |
'*handle': 'enumerate' | |
initialize: -> | |
console.log 'Initializing TimelineRouter...' | |
@timeline = new TimelineCollection() | |
enumerate: (handle) -> | |
TimelineController.enumerate handle | |
$ -> | |
new TimelineRouter() | |
Backbone.history.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment