Created
May 1, 2013 00:55
-
-
Save lgsunnyvale/5493054 to your computer and use it in GitHub Desktop.
backbone view and collection wire up
This file contains 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 TestView = Backbone.View.extend({ | |
initialize: function() { | |
console.log(this.collection) | |
this.collection.bind("reset", this.render); | |
this.collection.fetch({reset: true}); | |
}, | |
render: function() { | |
console.log("being rendered", this); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment