ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.94k stars 13.52k forks source link

Weird behaviour of ion-slide-box with slides that were empty when creating slidebox #2491

Closed kaikcreator closed 9 years ago

kaikcreator commented 9 years ago

When a ion-slide-box contains some slide whose visibility is decided dynamically, if all content of that slide is hidden/not-rendered, then navigation of the slider gets broken, because it ignores the slides whose content was hidden originally, although when those slides are selected their content is visible.

Right now, to solve it, I'm just adding an always visible DIV, with a space as a content, inside the slide.

See the Pen mugKz by Enrique (@-kaik-) on CodePen.

ajoslin commented 9 years ago

We can't really fix this. We layout the slides using CSS, and CSS depends on the slide having visible content.

If you want a slide to dynamically be in the DOM, use <ion-slide ng-if="someCondition">.

ionitron-bot[bot] commented 6 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.