Skip to content

Instantly share code, notes, and snippets.

@nambrot
Created January 5, 2012 21:17
Show Gist options
  • Save nambrot/1567352 to your computer and use it in GitHub Desktop.
Save nambrot/1567352 to your computer and use it in GitHub Desktop.
newsfeed route
newsfeed: function () {
// save current mainpanemodel
a.mainpane.saveState();
// we never fetch the newsfeed to get the latest stuff
var feed = new Feed();
feed.bind('load:finished', this.loadFinished, this);
feed.bind('load:start', this.loadStart, this);
feed.bind('load:end', this.loadEnd, this);
feed.fetch();
a.mainpane.addModel(feed, 0);
a.viewer.addModel(null);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment