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
Like a few other answers have mentioned in
npm install hammerjs --save
maint.ts
import 'hammerjs';
app.module
import { BrowserModule, HammerGestureConfig, HAMMER_GESTURE_CONFIG }
from '@angular/platform-browser';
...
export class HammerConfig extends HammerGestureConfig {
overrides = {
'pinch': { enable: false },
'rotate': { enable: false }
}
}
...
providers: [
{
provide: HAMMER_GESTURE_CONFIG,
useClass: HammerConfig
}],
...
I tried a million variations of the configuration and scrolling still did not work when I tested in chrome, I dont know if its the version or what but it did not work. When I tested in an actual mobile phone scrolling was working!