Hammer.js wrapper for Angular4+ to support some operation in the mobile
npm install ngx-hammerHammer.js wrapper for Angular4+ to support some operation in the mobile
This is a directive wrapper for Hammer.js 2.x.
If you want to find a same wrapper for VueJS, you can have a look at vue2-hammer
Available through npm/yarn as ngx-hammer.
``bash`
npm install -S ngx-hammer
or
`bash`
yarn add ngx-hammer
In a module
`typescript
import { HammerModule } from 'ngx-hammer'
...
imports: [
...,
HammerModule
]
...
`
#### Using the ngHammer directive
`html
Tap me!
See Hammer.js documentation for all available events.
$3
#### gestures
tap, pan, pinch, press, rotate, swipe
#### directions
up, down, left, right, horizontal, vertical, all
Run the Example
- Run
yarn or npm i`