@isoden/ngx-swipe
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @isoden/ngx-swipe

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • isoden