我正在使用angular-carousel在旋转木马中显示一组图像。除指示器外,旋转木马工作正常。指示灯未显示。以下是carouse的代码。
<ul rn-carousel rn-carousel-pause-on-hover="" rn-carousel-auto-slide="" class="image" ng-init="images = ['assets/img/1.png','assets/img/2.png','assets/img/3.png']">
<li ng-repeat="image in images"><img src="{{image}}"/></li>
</ul>
以下是显示指标的div。
<div rn-carousel-indicators ng-if="images.length > 1" slides="images" rn-carousel-index="carouselIndex"></div>
答案 0 :(得分:1)
您需要将carouselIndex
绑定到carousel指令:
<ul rn-carousel rn-carousel-pause-on-hover="" rn-carousel-auto-slide="" rn-carousel-index="carouselIndex" class="image" ng-init="images = ['assets/img/1.png','assets/img/2.png','assets/img/3.png']">