我想自动滑动离子滑块,但无法正常工作。滑块还包含图像。数据来自API调用。
<ion-slides autoplay="5000" loop="true" speed="300" pager="true" >
<ion-slide *`ngFor`="let item of topStories">
<ion-card (click)=" this.newsService.onGoToTopStoryPage(item)">
<ion-card-content >
<ion-img [src] = "item.image"></ion-img>
<h2> <b>{{item.title}} </b></h2>
<h4>{{item.summary}}</h4>
</ion-card-content>
</ion-card>
</ion-slide>
</ion-slides>
Run Code Online (Sandbox Code Playgroud)