I\'m having a problem using the HammerJS with Angular2. I have a carousel (based on the bootstrap carousel with Angular2 event handlers) where I\'m listening to the swip
After 2 days of research and frustration I've found the only working solution for me:
import { HammerGestureConfig, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
export class CustomHammerConfig extends HammerGestureConfig {
overrides = {
'pinch': { enable: false },
'rotate': { enable: false }
}
}
@NgModule({
// ... declarations, imports,
providers: [
// ...
{
provide: HAMMER_GESTURE_CONFIG,
useClass: CustomHammerConfig
}
],
bootstrap: [ AppComponent ]
})
export class AppModule {
}
taken from here