Angular 7 References/ Templates

Touch events

This is the documentation for Angular 7.
You can switch to the latest version Angular 10.

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.

<div (swipe)="swipeHandler()">
  Swipe me!
export class AppComponent {
  swipeHandler() {
    alert('Swipe handled!');
Swipe me!
Links & Tutorials