walmartlabs / thorax

Strengthening your Backbone
http://thoraxjs.org/
Other
1.32k stars 129 forks source link

Set collection options when passed through a constructor #366

Open yamsellem opened 10 years ago

yamsellem commented 10 years ago

The docs says:

Setting collection in the constructor will automatically call setCollection, so the following are equivalent:

var view = new Thorax.View({
  collection: myCollection
});
// identical functionality as above
view.setCollection(myCollection);

But setCollection takes options as a second parameter (optional). Is there a way to give this parameter to the view when using the view constructor?