Ionic : Ion-slides- Only First Slide appearing

寵の児 提交于 2020-06-17 09:51:04

问题


I'm trying to add ion-slides to my app, but i'm facing a problem that i don't have any idea how to solve it. I simple added the ion-slides example to my page:

<ion-slides>
  <ion-slide>
    <h1>Test</h1>
  </ion-slide>
  <ion-slide>
    <h1>Test2</h1>
  </ion-slide>
  <ion-slide>
    <h1>Test3</h1>
  </ion-slide>
</ion-slides>

And even with this simple example, the component just shows the first slide. When i try to swipe to the next one, it shows a blank slide, even though it's possible to inspect this element and it's content.

Do you have any ideas regarding this?

I didn't put more code here, because not even this code is working. I suspected that the problem was happening because i was trying to create this element in a Tab page, so I've tried to add this element into another page, but i still had the same behavior.


回答1:


I found the solution for my problem. When I started developing the application I set overflow attribute as hiddden for all Elements. So i had to make some changes in my code.




回答2:


Write your ion-clides code inside the ion-content or its not work then try this...



来源:https://stackoverflow.com/questions/49179573/ionic-ion-slides-only-first-slide-appearing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!