Hello everyboby,
I am trying to disable bounce effect based on the scroll position and I failed to have to desired result. Here is my source code :
<ion-content class="com-contener has-header" delegate-handle="comContener" on-scroll="checkScroll()" has-bouncing="active.bounce">
<img class="com-img" ng-src="data:image/jpeg;base64,{{com.img1}}" />
<div class="padding com-content">
<div class="com-title">{{com.title}}</div>
<p>
{{com.content}}
</p>
</div>
</ion-content>
and the controller:
.controller('ComDetailCtrl', function($scope, $stateParams, $ionicScrollDelegate, $timeout, Communication) {
$scope.com = Communication.get($stateParams.comId);
$scope.active = {
bounce : false
};
$scope.checkScroll = function() {
if ($ionicScrollDelegate.$getByHandle('comContener').getScrollPosition().top < 10) {
$scope.active.bounce = false;
console.log("inactif");
} else {
$scope.active.bounce = true;
console.log("actif");
}
}
})
The scroll position works great but the has-bouncing remain set to false.
Can someone help me ?