ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.94k stars 13.52k forks source link

bug: ShowPager and new ion-slides #4987

Closed ghost closed 8 years ago

ghost commented 8 years ago

Type: bug

Ionic Version: 1.x

Platform: all

Maybe it is me, but with the new ion-slides, it is impossible to change the showPager Boolean.

I tried a lot of things, and nothing worked.

privetr commented 8 years ago

Same problem here. I removed the condition ng-if="!showPager" in source code to avoid that pagination bullets are hidden when there are more than 10 slides.

masimplo commented 8 years ago

Yeap same issue. showPager should be exposed in the directive API so that is can be manipulated externally.

scope: {
     options: '=',
     slider: '='
   },
   template: '<div class="swiper-container">' +
     '<div class="swiper-wrapper" ng-transclude>' +
     '</div>' +
       '<div ng-hide="!showPager" class="swiper-pagination"></div>' +
     '</div>',
mjangelini commented 8 years ago

@chooseapp @privetr @masimakopoulos I found a solution that worked for me was this: $scope.options = { loop: false, initialSlide: 1, pagination: false };

Although the documentation for ion-slides is horrid and doesn't reveal anything at all. I just kind of guessed to see if it would work based on the Swiper API.

jgw96 commented 8 years ago

Hello all! Is this still an issue with the latest version of ionic? Thanks!

jgw96 commented 8 years ago

Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!

maxehnert commented 7 years ago

@jgw96 Can we open this up again? It still seems to be an existing bug that I am currently experiencing.

twinssbc commented 7 years ago

@maxehnert You can use $scope.options = { pagination: false }; in the pre-link hook function.

ionitron-bot[bot] commented 6 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.