Touch events
Touch events
Angular supports Hammer.JS gestures.
You only need to install Hammer.JS:
npm install hammerjs
And then import to main.ts
file:
import 'hammerjs';
After that you will be able to bind gesture events.
Source
<div (swipe)="swipeHandler()">
Swipe me!
</div>
export class AppComponent {
swipeHandler() {
alert('Swipe handled!');
}
}
Result
Swipe me!
Tutorials