Search code examples
angularjsionic-frameworkflickerion-slide-box

Ion slide box dynamic slide update flickering


I'm refactoring the list on each swap in a way that it will remove one item from the opposite direction and push another item from that direction. Resetting the active index. Then updating the slidebox by

$ionicSlideBoxDelegate.$getByHandle('custom-slider').update();

The issue is, it updates the slidebox with the default index and then let the new index to appear. Looks like flickering. How to prevent from this?

What I've already tried out but unsuccessful

  • wrapped the update with $timeout
  • used $ionicSlideBoxDelegate.$getByHandle('custom-slider').setup(); but got error like no method setup()
  • $timeout to the list, it makes the list disappear for a while.

Solution

  • I used ionic version 1.3.3 and used new ion-slides. These working great without flickering. Link: https://ionicframework.com/docs/v1/api/directive/ionSlides/