Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var SomeView = Backbone.View.extend({
- collection: new SomeCollection(),
- render: function() {
- this.$el.empty();
- this.collection.each( function (modelInCollection) {
- var newView = new AnotherView({ model: modelInCollection });
- this.$el.append(newView.render().el);
- }, this);
- });
- this.$el.append(newView.render().el);
- this.$el.append(newView.render().$el);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement