Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

SlideBox Pager gets doubled after animating and calling update Bug

$
0
0

@marcocaimi wrote:

Days ago i found a very complicated bug in the ionic slide box.
To reproduce create a slide box with 2 or more elements (using ng-repeat) slide to the second or the third, then call the update method of the slidebox handler you will get the pager buttons doubled.

This is because ionic adds fake slides to create the animations. when you call the update the fake slides are counted as real and the pager buttons get doubled.

To solve the problem i modified the code of ionic.bundle.js v 1.1.0 at about line 8110 with this code:

// cache slides
slides = element.children;
length = 0;
for (var i = slides.length -1 ; i >=0 ; i--) {
if(slides.item(i).className.indexOf("ng-animate")>-1){
slides.item(i).remove();
}
}

length = slides.length;

If the solution is nice can you add to the next release?
Thank you.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles