[英]Ionic swipe back on certain div element instead of ion-view with animation
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. 我知道Ionic只需使用
ion-view
元素的can-swipe-back
属性即可支持本机,例如在视图之间向后滑动动画。 Does anyone know if there is a way to allow the swiping only for a certain div
container within the ion-view
element? 有谁知道是否有一种方法仅允许在
ion-view
元素内的某个div
容器上刷卡?
In Ionic you can define any element with the swipe attribute: 在Ionic中,您可以使用swipe属性定义任何元素:
<div on-swipe-left="onSwipeLeft()" class="button">
<!-- some html -->
</div>
controller: 控制器:
$scope.onSwipeLeft = function() {
// Do anything, like going back in history
$ionicHistory.goBack();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.