Closed abritinthebay closed 10 years ago
This example: https://gist.github.com/justspamjustin/6359269#file-bossviewdocssubviews-js shows how you can do that. It's not very straightforward on the home page. But basically you just pass a function that returns an instance of your subview. You can pass any model or collection to that instance.
...
subViews: {
myCollectionView: function() {
return new Marionette.CollectionView({
collection: this.myOtherCollection
});
}
}
...
Right now it only uses this.model or this.collection when setting up the view.
This makes no sense if you have, for example, a collectionview subview that doesn't require the same collection OR more than one collectionview subview.
Is there a way to set this up currently (if so, it's non-obvious and not documented).