This is another very general question. I’m wondering why anyone ever needs to use Backbone.Model.trigger when instead, they can simply pass the model in question down to whoever needs it and change the model directly. When is the trigger method used?? Thanks!
This is another very general question. I’m wondering why anyone ever needs to use
Share
I’m not sure I fully understand your question, but the Event Aggregator model is used to decouple views. This means that you can trigger() an event in one view, and respond to it in another view without needing to know where it came from.
You can read more about the event aggregator model relating to backbone here: http://lostechies.com/derickbailey/2011/07/19/references-routing-and-the-event-aggregator-coordinating-views-in-backbone-js/