角度旋转木马指示灯不工作

时间:2016-01-16 17:41:10

标签: javascript css angularjs angular-carousel

我正在使用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>

有人可以建议如何让指标正常工作。 enter image description here

1 个答案:

答案 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']">