Events

You want to know what happens inside the directive? Why not set up an event listener.

You can use it in combination with the directive or with the service. The the dispatcher returns the following events:

I'm initialised using the hlStickyElement service. Scroll the page so you can see when something happens.
  • {{serviceEvent}}
I'm just here to give the bottom anchored sticky element some room
I'm initialised using the hl-sticky directive. Scroll the page so you can see when something happens.
  • {{directiveEvent}}