Make a slide moving

He everybody

I use this tag <ion-slides pager> <ion-slide > <h1>Slide 1</h1> </ion-slide> <ion-slide> <h1>Slide 2</h1> </ion-slide> <ion-slide> <h1>Slide 3</h1> </ion-slide> </ion-slides> for creating a slide in a page of my apps but i don’t know how to do for moving this slide after 5 Second (for example)

thanks for your help

I think $ionicSlideBoxDelegate is what you are looking for.

1 Like

Thanks for your help i use v2 not v1

Read the docs and it’ll be clear. You can find them over here.

Just use the autoplay on your ion-slides like this:

<ion-slides pager autoplay="5000">

as the doc states: “Autoplay: Delay between transitions (in milliseconds). If this parameter is not passed, autoplay is disabled. Default does not have a value and does not autoplay. Default: null.”


thanks :slight_smile: <ion-slides pager autoplay="5000"> it’s working for me

why me.

<ion-slides pager autoplay="5000">

“Cannot read property ‘hasAttribute’ of undefined”

Care to share some more info? What version of Ionic are you on for starters, how does the exact error look like and can you provide a larger snippet? @poonsak58


Same problem here. Not working…

Same problem here isn’t going to solve anything for you I’m afraid. Start a new topic, add your current version in there and the code that isn’t working. Then I’ll look into it for you.

I already did.

Would appreciate your help.

I have exactly the same issue just copying/pasting the code from ionic docs and adding autoplay.

Runtime Error
Cannot read property ‘hasAttribute’ of undefined

TypeError: Cannot read property ‘hasAttribute’ of undefined
at autoplay (http://localhost:8100/build/vendor.js:52153:20)
at startAutoplay (http://localhost:8100/build/vendor.js:52196:5)
at initSwiper (http://localhost:8100/build/vendor.js:52142:9)
at Slides._initSlides (http://localhost:8100/build/vendor.js:62719:87)
at http://localhost:8100/build/vendor.js:62740:19

Any help?

@Corin I’m having the same exact issue. Did you ever figure this out?