@isoden/ngx-swipe
v1.0.1
Published
An Angular module to add directive that emit swipe event as `Output`.
Downloads
2
Readme
ngx-swipe
An Angular module to add directive that emit swipe event as Output
.
Installation
npm install @isoden/ngx-swipe
Usage
- Import
SwipeModule
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { SwipeModule } from '@isoden/ngx-swipe';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
SwipeModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
- Use directive
<div
(ngxSwipeX)="onSwipeX($event)"
(ngxSwipeY)="onSwipeY($event)"
></div>
Limitation
ngx-swipe uses PointerEvent.
please use polyfill (e.g. PEP) if you need.
Pointer events - caniuse