I know that Ionic supports native like swipe back animations between views simply by using the can-swipe-back
attribute of the ion-view
element. Does anyone know if there is a way to allow the swiping only for a certain div
container within the ion-view
element?
In Ionic you can define any element with the swipe attribute:
<div on-swipe-left="onSwipeLeft()" class="button">
<!-- some html -->
</div>
controller:
$scope.onSwipeLeft = function() {
// Do anything, like going back in history
$ionicHistory.goBack();
}