Knowing whether an item is swiped?


#1

I have a list of items, and for each item, I have an ng-click that triggers a “details” screen. I’m adding support for option buttons to the items, and I’d like to make it so that if an item is swiped open, and I click on it, it closes again, but if it’s closed, it opens the modal like normal. (ie, tapping an open item closes, rather than launching)

As far as I can tell, there’s no way to really interrogate the current state of an item, so I can’t tell which behavior I need to perform when receiving a tap.

Is there a reasonable way to do this? Or are options just opaque things that the item doesn’t really know about?


#2

You can check out this codepen. It should how to handle some of the gestures that come with ionic.


#3

Aha! Thanks, I’ll play with that.