I am making a Ionic mobile app, whose main view is a vertical list of cards. I want each card to be \"swipable\", in the same way as Google Now cards.
I started to imple
Another approach uses $ionicScrollDelegate to enable/disable vertical scrolling when needed.
So, for example, in each
add on-drag-left and on-drag-right event handlers:
In those handlers $ionicScrollDelegate is used as in code below:
$scope.disableVerticalScrolling = function() {
$ionicScrollDelegate.getScrollView().options.scrollingY = false;
}
$scope.enableVerticalScrolling = function() {
$ionicScrollDelegate.getScrollView().options.scrollingY = true;
}
These functions are also called when finished some operations done by option buttons (i.e. edit, delete, share, ...).
Here is an example showing this approach:
http://codepen.io/beaver71/pen/XXVzXa?editors=101