@isoden/ngx-swipe

An Angular module to add directive that emit swipe event as `Output`.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
02Apr 17, 2019Jan 6, 2018Minified + gzip package size for @isoden/ngx-swipe in KB

Readme

ngx-swipe

An Angular module to add directive that emit swipe event as Output.

Installation

npm install @isoden/ngx-swipe

Usage

  1. 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 { }
  1. 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

License

MIT License

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.