backbone.js - How to show multiple views (CompositeView) in a region - Backbone Marionette -
i have compositeviews, , want render in region. compositeview count dynamic.
my solution:
container = backbone.view.extend() // not itemview, needs template items = document.createdocumentfragment(); _.each(data, function(m, k) { items.appendchild(new compositeview({collection: new collection(m)}).render().el); }) app.region.show(new container({el: items}))
Comments
Post a Comment