ons-carousel method has been tried.
Can I get the following information from ons-carousel?
If you know the above information, please let me know.
javascript jquery onsen-ui angularjs cordova
The number of elements seems to be available below.
_getCarouselItemCount()
However, as you can see, this method is for internal use in OnsenUI, so you should be prepared to change the name or delete it in future versions.
After that, you can get the current index number (a number starting with 0), so you can determine if it is the last item compared to the number of elements obtained in the above method.
ons-carousel-item
to get only the number of elements
document.getElementsByTagName('ons-carousel-item') .length
I think it's okay to say that.
© 2024 OneMinuteCode. All rights reserved.