arlevi
October 12, 2017, 1:41pm
1
I’m using something I found on the web called
<div (swipeleft)="showLeftPage()">
<div (swipright)="showRightPage()">
It works great ! but where the hell are the docs for it ? can’t find anything.
Basically my problem is that - swipeleft
& swiperight
sliding the page from the same side ( left -> to -> right )
I want the swipeleft
to be left -> right, and swiperight
will be right -> left
Thanks for the helpers in advanced !
I dumped the event contents and noticed the offset parameter changes. So I wrote this: (I have no idea if this is the right way)
Example:
Code:
<ion-content padding>
<img (swipe)="swiped($event)" src="http://via.placeholder.com/350x350?text=swipe left or right" />
<p></p>
Swipe: {{swipeData}}
swiped(e) {
switch (e.offsetDirection) {
case 2: this.swipeData = "right to left"; break;
case 4: this.swipeData = "left to right"; break;
default: this.swipeData = "magic"; break;
}
}
arlevi
October 15, 2017, 9:26am
3
thank you very much !
Can you tell me why it doesn’t appear in Ionic’s Docs ?
I mean - is it a 3rd party kind of thing ?