2012-11-05 134 views
0

我在initialize對我的看法多的聽衆,看起來是這樣的:骨幹收集多個

this.collection.on('reset', this.render); 

this.collection.on('add', this.render); 

this.collection.on('change', this.render); 

我很好奇,如果有對所有這些結合起來,因爲一個方式,他們都火了render

回答

5

可能是你可以嘗試

this.collection.on("reset add change", this.render); 

this。它在那裏顯示,但不確定如何將其與默認收集事件綁定。