I do not recommend doing what Dmitry suggested; there is an easy way to do this.
Use extensible options :
Add #ionItem to #ionItem ion-item and add side="end" and an event (ionSwipe) to the ion-item-options parameters in your HTML.
<ion-item #ionItem> </ion-item> <ion-item-options side="end" (ionSwipe)="swipedNotification(ionItem)"> <ion-item-option class="notifications-swipe-button" expandable> </ion-item-option> </ion-item-options>
And in your CSS, set the button width to 30 pixels so that you can run ionSwipe, which does not get called if the width is too large:
.notifications-swipe-button{ width: 30px; }
And in your ts file, add your function, which will be called (ionSwipe) in your HTML, and (ionSwipe) content is completely on the left:
swipedNotification(el){ el.el.style.transform = 'translate3d(calc(-100vw), 0px, 0px)'; }
Keep in mind this is configured to swipe left to reject, if you want to swipe right, you will have to update the x property in translate3d.
Josh O'Connor
source share