Skip to content

Instantly share code, notes, and snippets.

@gingerrific
Created June 19, 2014 18:11
Show Gist options
  • Save gingerrific/a58f7326647913015de5 to your computer and use it in GitHub Desktop.
Save gingerrific/a58f7326647913015de5 to your computer and use it in GitHub Desktop.
var AppView = Parse.View.extend({
initialize: function () {
this.collection = new FullPostCollection();
this.collection.on('add', this.addPost)
this.collection.fetch({add:true});
},
addPost: function (pic) {
new ThumbnailView({model: pic});
}
});
var app = new AppView();
// this serves the same purpose as the App View in this instance
var coll = new FullPostCollection();
coll.on("add", function (pic) {
new ThumbnailView({model: pic});
})
coll.fetch();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment