Communicating via Events
Explore how to use events, event bubbling, and the trigger method in Marionette.js to manage interactions in your applications. Understand how child view events bubble up to parent views and how to handle them efficiently.
We'll cover the following...
We'll cover the following...
Triggering an event for deleting a contact
Let’s trigger an event indicating a contact should be deleted instead of deleting it directly in the view:
The view’s trigger method in line 13 is given an event name to trigger and an argument to pass
on. Next, we need to process this event within our controller:
Once again, it’s important to remember scopes when dealing with events: ...