Ion-slide-box crash on phonegap app


If I use NG-repeat to populate ion-slides in ion-slide-box, then phonegap app crashes if large object is assigned to NG-repeat.
Like if length of object is around 20-30 then NG-repeat works but if length is around 50-60 then app crashes without throwing any error.

I tried to us ’ limitTo ’ with angularjs but it didn’t updated ionic slide box.


Taking a look into this…


You could do something like this.

 <ion-slide-box  on-slide-changed="slideChanged(index)">
      <ion-slide ng-repeat="group in groups">
        <ion-content ng-show="$index >= (currentSlide-1) && $index <= (currentSlide+1)" > 
            Group {{}}
          <ion-item class="item-accordion"
          ng-repeat="item in group.items">
            <img src="">

This will hide the slides if they are not the previous, current, or next slide


Thanks a lot, let me try this.


You are a life saver :smile: :smile: :smile:

It worked like a charm.

I thought that the problem was, the size of array. So i tried to implement fixed length DEQUEUE. It did solve the issue of crash but, behaviour was getting weired. Whenever i swiped, it was jumping to ->next -> next element of DEQUEUE.