-
-
Save Grummle/1377023 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 | |
url: /tweets/ | |
timeline = new TimelineCollection() | |
TweetView = Backbone.View.extend | |
initalize:-> | |
@timeline = @options.timeline | |
@timeline.bind('reset',@display,@) | |
display:-> | |
_.each(timeline.models,((model)->$(@el).append(model.render)) | |
class TimelineRouter extends Backbone.Router | |
routes: | |
'*handle': 'enumerate' | |
initialize: -> | |
console.log 'Initializing TimelineRouter...' | |
@timeline = @options.timelineCollection | |
@timeline.fetch({data:{q:'somefilter'}) | |
enumerate: (handle) -> | |
TimelineController.enumerate handle | |
$ -> | |
new TimelineRouter({timelineCollection:timeline}) | |
Backbone.history.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment