swipeLeft(), swipeRight() events no longer working in ionic 4

Hi,
I’m upgrading an app to ionic 4 and noticed that the swipeLeft() and swipeRight() events that I used to implement custom functionality no longer appear to be working. I couldn’t find anything in the docs about it either. Have the function names changed? How can I bind custom code to swipe events in ionic 4?
Cheers
J

Have you added hammer.js? It isn’t shipped anymore with Ionic as of v4 https://github.com/ionic-team/ionic/issues/14883

Thanks, that helps! There are a bunch of different solutions suggested in the thread. Do you know which one might be the most robust?

I don’t know which one is the most robust. I use the one I described (I’m peterpeterparker on Github), so far seems ok

I see. You say in there that you create it as a provider but as far as I can tell those don’t exist anymore in v4. Is it a service?

Providers = services, same same. But yes if you called your injectable services then in your services

The easiest way is to:
Install hammer js.
And add this line into the src/main.ts
import ‘hammerjs’;