$ionicSlideBoxDelegate disable slide for a particular direction


#1

Is there a way to dynamically disable slide for a particular direction? A more specific version of $ionicSlideBoxDelegate.enableSlide([shouldEnable]) with direction.

My use case is multiple forms spread across multiple slides. You can move forward only when the form is validate, but you can move back to a previous slide.


#2

This is good feature idea, you should open an issue for this.

In the mean time, what you could do instead is use a mixture of ng-if to conditionally show/hide slides.


Jumping out of a slider and returning back
#3

Thanks, great example. I have annotated it and will use it a reference going forward.


#4

The pager doesn’t update correctly. Once, a slide has been added it can’t be removed from the pager indicator. The next and previous functions work correctly.

To reproduce, use the above Codepen. After validating a new slide, click validate again, the pager doesn’t change.


#5

Hmm, seems that just the pager isn’t keeping up, but the slides themselves are good. Also if you validate a slide, then click the button again and adjust the view window. The pager updates but only if you resize the window.


#6

It refreshes correctly adding slides, not downsizing the number of slides. The logic gates to move forward through slides work fine.

My other issue is that the pager is misleading. In my case, we have the pager to indicate the number of steps to complete this task. If it is continuous changing, the user doesn’t know what is going on.

It would be nice if the pager contained all slides and indicated current, but wasn’t dependent on ng-if and slide update.

Maybe, I need to implement my own indicator based on updates from the slideChanged().

Do we have any pager example code?


#7

Looking at the ionPager code, it is using an ng-repeat in the directive. Can an ng-repeat shrink?