Ion-slides auto height?


I researched online a lot and I could not find anyway to make ion-slides has auto height based on the content image height. If I don’t set the height for the slider, the slide basically won’t work.

This is really inconvenient because we have different devices like iPhone 4, 5 and 6. The image height is set proportional with the width but how can I set the height of the slider to be the same with the image height? Please help.



I looked at the source of properties but could not find anything relevant to sizing, keep us posted if you have arrived at a solution. Thank you.


doesn’t anybody have a solution?


maybe here


I wrote a LOT of different solutions in that thread. Just code the deepest one in the thread.

Basic idea: wrap your slides in a <div>...</div> and life is good.


@ryanlogsdon i used it but not working in my case.


@HarshadD sorry, but that part of the architecture was changing on Ionic’s side so often. It seemed that as soon as I wrote a solution, they changed their implementation.


@ryanlogsdon is there any other solution to solve this problem?


Hi @HarshadD, the only solutions that I know of are in that thread.

<ion-slides style="height:100%">