question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

$ionicSlideBoxDelegate doesn't work with new ion-slides

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mtpultzcommented, Jul 29, 2016

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

2reactions
joanebrowncommented, Jul 29, 2016

Here is a codepen:

https://codepen.io/anon/pen/oLrYzq?editors=1010

As you can see, the $ionicSlideBoxDelegate.slide(); doesn’t work.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found