Communicating via Events
Learn how to delete a contact using events in Marionette.
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: ...