Closed nadavvin closed 10 years ago
This is documented here http://epoxyjs.org/documentation.html#handler-collection
Note that the collection binding does not register a "change" event on its collection to avoid generally superfluous updates. Instead, you may manually trigger an "update" event on the collection to refresh its bindings. For a working demonstration of the collection binding, see the Epoxy ToDos demo.
Could you explain your use case? Usually the collection does not need to react to individual model changes.
@Prinzhorn is right. That's exactly why Epoxy doesn't listen to Collection changes... A collection doesn't have a native change trigger, it simply proxies those of its models. As a result, a lot of collection-specific behavior would be triggered by model-specific events. I take it you're trying to bind a template to a collection? I'd suggest using templates with individual models. The docs should be updated to reflect that.
if collection's model change, Epoxy not update the template. when model is change , the collection change trigger is also throw.
this.listenTo(this.collection, "change", function(){console.log("update");}, this);