Wiring up the Show Event

Learn to add the show button to our application’s main page and how to trigger an event in Marionette.

So far, we’ve implemented the functionality to display a list of our contacts. Let’s display contacts on dedicated pages now.

Adding the “Show” button

First, let’s add a “Show” button in our template:

Press + to interact
<script type="text/template" id="contact-list-item">
<td><%- firstName %></td>
<td><%- lastName %></td>
<td>
<a href="#" class="btn btn-small js-show">
<i class="icon-eye-open"></i>
Show
</a>
<button class="btn btn-small js-delete">
<i class="icon-remove"></i>
Delete
</button>
</td>
</script>

Notice we’ve already included ...

Get hands-on with 1400+ tech skills courses.