mihnsen / ui-carousel

A simple, lightweight module for carousel in your AngularJS app, Inspired from slick carousel.
http://mihnsen.github.io/ui-carousel/
MIT License
77 stars 67 forks source link

How to pause and resume the slideshow on button clicks? #47

Open AUK4GIT opened 6 years ago

AUK4GIT commented 6 years ago

I did bind the attribute autoplay to a model in controller. But still could not achieve the pause and resume functionality.

<ui-carousel 
              slides="slides"
              slides-to-show="1"
              slides-to-scroll="1"
              initial-slide="0"
              autoplay={{ autoplay }}
              fade="false"
              autoplay-speed="5000"
              speed="1000"
              dots="true" on-init="onCarouselInit()"
              on-before-change="onCarouselBeforeChange(item)"
              on-after-change="onCarouselAfterChange(item)">

              <carousel-item>
                <div>
                  <div class="carouselChartDiv" ng-class="item.template"></div>
                </div>
              </carousel-item>

            </ui-carousel>