I’ve been dabbling with the slide box. I’m trying to create an on-boarding process using the Slide Box. Unfortunately, there does not seem to be a way to add slides once configured. It would be nice to be able to inject slides in depending on what actions the user has taken.
Example : Have Slidebox with an intro page, user swipes to reach a registration page. Once they have properly filled out the form and submitted, another slide is added to show a waiting on email verification page. Then, once email is verified, another slide added.
Another thing that would be nice is to prevent sliding to the next &/or previous slides depending on current user actions.
I’ve poked around in slideBox.js and ionicSlidebox.js looking for ways to do this. I’m afraid the code is a bit over my head to implement this myself.
Any suggestions on how to implement this? I see that slideBox.js has appendSlide, prependSlide etc. However, I can’t figure out how to access those methods from within a view controller.
It was quite a hack. You might be better off just injecting slides AFTER the user is allowed to move to the next one. Or using ng-if on the slides until the user is allowed to move to the next.
Initially I want to render all the slides and just disable the moving (more simple to manage the slides, don’t need to use $ionicSlideBoxDelegate.update() and I want to show the pager for the all wizard )
So it doesn’t come so well, And therefore I’m trying to inject (and managing the pager by myself).
I’m updating the slides array and call $ionicSlideBoxDelegate.update() and then call $ionicSlideBoxDelegate.next() but it doesn’t slides to the next.
I add $timeout before I call to next and then it slides but the render doesn’t finish yet and it finished after the slide ends