diogoqueiros / ionic-swipe-all

Allow Ionic to recognize both horizontal and vertical swipe gesture.
16 stars 8 forks source link

swipedown and swipeup both of them are not working at all. #5

Closed jeffminsungkim closed 6 years ago

jeffminsungkim commented 6 years ago

Left and Right works fine though. Do you still even update this repo?

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.4
Cordova Platforms  : android 6.3.0
Ionic Framework    : ionic-angular 3.9.2

System:

Node  : v8.9.0
npm   : 5.5.1
OS    : OS X El Capitan
Xcode : Xcode 8.0 Build version 8A218a
diogoqueiros commented 6 years ago

Hi @jeffminsungkim, thank you for your issue. Can you please provide a plunker (or similar) that demonstrates this issue? I'm using this in production with no problems until now.

Meanwhile I'm going to update to angular 5 as soon as I can.

jeffminsungkim commented 6 years ago

Hello! @diogoqueiros, thanks for the quick response. Wasn't expect that. Here's how my code looks like. Btw I'm calling this page as a modal.

showProfileModal() { this.modalCtrl.create('ProfilePage').present(); }

profile.html

<ion-grid swipeAll (swipedown)="swipeDown($event)">
        <ion-row align-items-center>
            <ion-col col-12>
                <img *ngIf="previewImage;then previewImg else customImg">
                <ng-template #previewImg><img [src]="previewImage" (click)="presentActionSheetTwo()"></ng-template>
                <ng-template #customImg><img [src]="avatar" (click)="presentActionSheet()"></ng-template>
            </ion-col>
            <ion-col col-12>
               <h3>{{displayName}}</h3>
            </ion-col>
        </ion-row>
    </ion-grid>

profile.ts

  swipeDown(event: any): any {
    console.log('swipeDown', event);
  }
diogoqueiros commented 6 years ago

Hi @jeffminsungkim. I'm using a modal too. Your example works fine for me. Did you import IonicSwipeAllModule into your NgModule?

jeffminsungkim commented 6 years ago

Hey @diogoqueiros I've just created a new test project and it works like a charm. I should double check my previous project. Thank you @diogoqueiros 👍