AmpersandJS / ampersand-view

A smart base view for Backbone apps, to make it easy to bind collections and properties to the DOM.
http://ampersandjs.com
MIT License
92 stars 39 forks source link

Returning collectionView on renderCollection() #42

Closed jrmyio closed 10 years ago

jrmyio commented 10 years ago

To make it possible to track your model views of your collections. It is very handy to have a reference to the collectionView. Currently you can only use a syntax like this._subviews[1].views but this is rather hacky, nor do you exactly know what view it is.

By giving renderCollection() a return value of collectionView you can easily do this.views = this.renderCollection(); _.each(this.views, function(view){});

I created a Pull Request: https://github.com/AmpersandJS/ampersand-view/pull/41

bear commented 10 years ago

closing as pull request #41 is merged