Created
June 19, 2014 18:11
-
-
Save gingerrific/a58f7326647913015de5 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
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