ionic-framework: Slidebox doesn't continue anymore when it reaches end (mix of static slides and ng-repeat slides)
When using a an ng-repeat for ion-slides, the slidebox won’t continue sliding when it reaches the last slide. It just stops when it reaches the end.
Tried with setting does-continue=true
explicitly and without.
Tested on 1.0.0 beta 6.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 19 (3 by maintainers)
Commits related to this issue
- fix(slidebox): refactor for performance and stability Closes #2336. Closes #2317. Closes #2290. Closes #2228. Closes #2067. Closes #1890. Closes #1865. Closes #1850. Closes #1755. Closes #1688. Close... — committed to ionic-team/ionic-framework by ajoslin 10 years ago
- fix(slidebox): refactor for performance and stability Closes #2336. Closes #2317. Closes #2290. Closes #2228. Closes #2067. Closes #1890. Closes #1865. Closes #1850. Closes #1755. Closes #1688. Close... — committed to ionic-team/ionic-framework by ajoslin 10 years ago
https://github.com/driftyco/ionic/blob/6c9bc15b2996ae9183624c84a2709fd33f80d20b/js/views/sliderView.js#L55
It’s because first time the Slider initialized “slides.length” is equal to 0, the “options.continuous” is set to false, when "IonSlideBoxDelegate.update() " called, “options.continuous” is not retrieved from the settings but keep to be false.
change
to
solve the problem
Another workaround is to get the
$ionicSlideBoxDelegate
and call the methodloop(true)
. I am using Ionic 1.3.1.As workaround…
JS
CTRL
It appears the bug is with there being a mix of regular elements and
ng-repeat
elements anddoes-continue="true"
. Here’s an example with two static slides along with the ng-repeat. Things get really wonky. http://codepen.io/perrygovier/pen/vdyhp