New ion-slides component does not show in modal


#1

Hi,

I’m trying to replace the deprecated ion-slide-box with the new ion-slides component. When I use the default example of the documentation, everything works fine of course, but I often use the old ion-slide-box in a modal (full screen images, as a kind of lightbox).

When I combine the default example of ion-slides with the default example of the modal, the slides don’t show. As far as I can see in the inspector, the slides have height: 0.
Does anyone know how I can fix this?

And when will the deprecated ion-slide-box be actually removed?

Any help would be greatly appreciated.

Kind regards,

Sybrand Hoeksma
Firmaq Media
The Netherlands


#2

you can listen on, when the modal has finished animating in --> after that you can show the ionSlides (use ngIf).

the .show-method of a modal returns a promise, that is resolved after the modal is open and ready.

Or you have to set a fixed height. Per default it uses the values of the parent container --> if it is starting animating in --> the modal has no height :wink:


#3

Ah, I see. That makes sense. I’ll try to fix the height with CSS then.
Thanks.