I need this for my application, and I was able to use CSS classes to override the transformation in the item-content element, which is dynamically added as a child of the ion-item .
My template has the following:
<ion-item collection-repeat="report in dashboardReports" ng-class="isSwipeable(report.id)"> <p>Some content</p> <ion-option-button ng-click="itemButton(report.id)"> </ion-item>
Then in my controller I have the following:
$scope.lockedItems = [] $scope.itemButton = function(id) { $scope.lockedItems.append(id) } $scope.isSwipeable = function (id) { if ($scope.lockedItems.indexOf(id) !== -1) { return 'swipe-disabled'; } else { return true; } };
Then in my CSS, I redefine the swipe animation like this:
.swipe-disabled div.item-content { -webket-transition: none !important; -webket-transform: none !important; transform: none !important; }
I have the feeling that this is hacky, but the Eder solution does not work for me, and Ion does not support this yet.
source share