$ionicSlideBoxDelegate doesn't work with new ion-slides
See original GitHub issueI need to change the ion-slide-page
dynamically, so, as says in the ion-slides docs I need to use $ionicSlideBoxDelegate
.
And in the $ionicSlideBoxDelegate docs they says which I need to use the slide
method.
So I tried with:
var secondSlide = 1;
$ionicSlideBoxDelegate.slide(secondSlide);
But doesn’t work. Nothing happens, does not throw any errors.
There isn’t any way to do that with the new and non deprecated ion-slides
?
My environment:
Cordova CLI: 6.2.0
Ionic Framework Version: 1.3.1
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
Node Version: v4.2.2
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
$ionicSlideBoxDelegate doesn't work with new ion-slides #7463
I need to change the ion-slide-page dynamically, so, as says in the ion-slides docs I need to use $ionicSlideBoxDelegate.
Read more >Cannot get slidesCount from $ionicSlideBoxDelegate
Ionic's new slide is derived from swiper. According to ionic's documentation it is deprecated in favour of the newer component. You will have...
Read more >Slide Box not apperning - ionic-v1
Hi, I'm new to ionic framework. I'm having problem display slide box images. they do not appear. I checked the codes and noticed...
Read more >ion-slide-box - Directive in module ionic
Attr Type Details
does‑continue. (optional) boolean Whether the slide box should loop.
active‑slide. (optional) expression Model to bind the current slide index to.
Read more >Ionic Example: ion-slide-box - Raymond Camden
I thought I'd use the Bing Image Search API since it worked well for me in ... of updating the scope - but...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @joanebrown,
The ion-slides uses the underlying API of Swiper mentioned at the top of the slide-boxes docs. So you’ve grabbed a reference to the slider onInit (
$scope.slider
), and then looking at the Swiper API you can use$scope.slider.slideTo(index)
or in your case$scope.slider.slideTo(slider)
. I updated your plunkr.I may be wrong, but I believe the $ionicSlideBoxDelegate is only for the old ion-slide-box component, where you’re using the ion-slides component.
Cheers
Here is a codepen:
https://codepen.io/anon/pen/oLrYzq?editors=1010
As you can see, the
$ionicSlideBoxDelegate.slide();
doesn’t work.