Reputation:
I am using ionic slides and I want to hide the pager when the user reaches the last slide. There is a showPagger() method but I cannot figure out how to use it for this purpose.
Any help on this?? Thanks
Upvotes: 1
Views: 995
Reputation:
Unfortunately, after searching and searching I found out that it is an open issue about it in ionic repository. The showPager property is not exposed to the directive API, so there is no direct use to it.
Upvotes: 0
Reputation: 947
html :
<ion-slides pager (change)="onSlideChanged()">
...
<ion-slides>
js :
$scope.onSlideChanged = function() {
if ($ionicSlideBoxDelegate.currentIndex() == $ionicSlideBoxDelegate.slidesCount()) {
$ionicSlideBoxDelegate.showPager(false);
}
else {
$ionicSlideBoxDelegate.showPager(true);
}
}
I will update answer later.
Upvotes: 1