ionic2:幻灯片中的内容不滚动 [英] ionic2 : content in slides not scrolling
本文介绍了ionic2:幻灯片中的内容不滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有几张幻灯片,其中添加了动态内容。问题是幻灯片内的内容不会滚动。因此,如果我有很多项目,只有一些节目,没有能力滑动。如何才能使我的列表中的内容在幻灯片中滑动?
I have a couple of slides which have dynamic content that is added to them. The problem is the content inside of the slides doesn't scroll. So if I have a lot of items only some show and there is no ability to slide. How can I make it so the content in my lists slides inside of their slides?
<ion-content>
<ion-slides (change)="onSlideChanged($event)">
<ion-slide >
<ion-list>
<ion-item *ngFor="#item of items1; #i = index">
<h2>{{item}</h2>
</ion-item>
</ion-list>
</ion-slide>
<ion-slide>
<ion-list>
<ion-item *ngFor="#item of items2; #i = index">
<h2>{{item}</h2>
</ion-item>
</ion-list>
</ion-slide>
</ion-slides>
</ion-content>
推荐答案
我有同样的问题,我解决它就像这个:
I have the same problem,and I solve it like this:
<ion-slides style="height: auto">
<ion-slide *ngFor="#item of items">
<h1>{{item.title}}</h1>
<p>{{item.description}}</p>
</ion-slide>
</ion-slides>
这篇关于ionic2:幻灯片中的内容不滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文