1.1.8 • Published 5 years ago
ngx-hammer v1.1.8
ngx-hammer
Hammer.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
Install
npm/yarn
Available through npm/yarn as ngx-hammer
.
npm install -S ngx-hammer
or
yarn add ngx-hammer
In a module
import { HammerModule } from 'ngx-hammer'
...
imports: [
...,
HammerModule
]
...
Usage
Using the ngHammer
directive
<a ngHammer="{event: 'tap'}" (eventTraggered)="onTap()">Tap me!</a>
<div ngHammer="{event: 'swipe', direction: 'horizontal'}" (eventTraggered)="onSwipe()">Swipe me!</div>
See Hammer.js documentation for all available events.
Supported gestures and directions
gestures
tap, pan, pinch, press, rotate, swipe
directions
up, down, left, right, horizontal, vertical, all
Run the Example
- Run
yarn
ornpm i
- See localhost:4199
License
1.1.8
5 years ago
1.1.7
6 years ago
1.1.6
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago