When creating a custom directive (and in other circumstances) you may be interested in listening for events that are happening on the host element. Let's say for example that I created a custom directive that I wanted to attach to the
<ion-content> component, like this:
The host element, which is
<ion-content> in this example, may emit events that we want to make use of in our directive. In this video tutorial, we will walk through how you can listen for events on a host element in Ionic 2 (which is just vanilla Angular, it's not specific to Ionic).
Here's the video: