6

On my page I am having an ion-slide-box for images. Since in my app users will be able to embed videos, I should also add iframes with videos to the same slider. This is how my code looks like now:

This is my html:

<ion-slide-box ng-if="slider.length > 1">
  <ion-slide ng-repeat="item in slider">
    <img ng-if="item.image" ng-src="{{ fileServer }}/imagecache/cover/{{ item.image }}" class="cover">
    <iframe ng-if="item.video" src="{{ item.video | safeUrl }}"></iframe>
  </ion-slide>
</ion-slide-box>

This works fine with only images, but when I have videos I can't slide them if they take up 100% width, which I have set up in my css, I can only slide them if they are wide less than that and if I slide them only on that part where the iframe is not taking up space in the slider. Since I need to have iframe taking up 100% width, I wonder how to make it work?

Ludwig
  • 1,401
  • 13
  • 62
  • 125

1 Answers1

1

Have you tried ion-slides instead?

ion-slide-box is deprecated

ion-slide-box will be removed in the next Ionic release in favor of the new ion-slides component. Don't depend on the internal behavior of this widget.

Lightbeard
  • 4,011
  • 10
  • 49
  • 59
  • I noticed that with both ion-slide-box and ion-slides I get the same result, seems like I can only slide iframes with videos around the bulletpoints. So I am wondering how to make that for the whole iframe. – Ludwig Aug 11 '16 at 10:33