Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

HammerModule

Adds support for HammerJS.

See more...

      
      class HammerModule {
}
    

Description

Import this module at the root of your application so that Angular can work with HammerJS to detect gesture events.

Note that applications still need to include the HammerJS script itself. This module simply sets up the coordination layer between HammerJS and Angular's EventManager.

Providers

Provider
      
      {
    provide: EVENT_MANAGER_PLUGINS,
    useClass: HammerGesturesPlugin,
    multi: true,
    deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Console, [new Optional(), HAMMER_LOADER]]
}
    
      
      { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] }