The Ionic slidebox requires explicit CSS to show Ionic content
See original GitHub issueFor instance, the html below will not display any slides even when all variables used contain data. It works if I remove the <ion-content>
tag, but then I would not be able to scroll if the content is more than the screen height.
<ion-view title="Title">
<ion-slide-box show-pager="false">
<ion-slide ng-repeat="article in filteredArticles">
<ion-content class="has-header">
<img ng-src="{{ article.imageURL }}" ng-style="{ 'width': '100%' }" />
<div ng-bind-html="article.html"></div>
</ion-content>
</ion-slide>
</ion-slide-box>
</ion-view>
If I want to keep the <ion-content>
tag, I must have explicit CSS like so:
.slider {
height: 100%;
}
Is there a reason why the .slider class doesn’t have a default height of 100%?
Issue Analytics
- State:
- Created 9 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
ionic <ion-slide-box> content view - Stack Overflow
i'm developing a mobile web application, the problem is that <ion-slide-box> does not show its contents. class="slider-slides" has a width of ...
Read more >Ion-Slides: Mobile Touch Slider with Built-In & Custom Animation
With the release of Ionic Framework v6, the Ionic Team has deprecated the ion-slides and ion-slide components in favor of using the official...
Read more >Ionic Example: ion-slide-box - Raymond Camden
The ion -slide-box directive lets you embed a set of images (or random HTML) and then display one item at a time.
Read more >A Sliding Nightmare: Understanding the Range Input
We need to bring up DevTools, then go to the range input we want to inspect, right click it, select Inspect Element and...
Read more >ionic-framework/CHANGELOG.md at main - GitHub
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@perrygovier when i put <ion-content> everthing is ok. you save my life =) thank you
Hey @dtangster,
<ion-content>
isn’t meant to be used inside an<ion-slide-box>
. You probably want to use something like<ion-scroll>
for similar behavior.