我有以下html代码呈现角度ui-bootstrp轮播:
<div class="slider" uib-carousel active="active" interval="myInterval" >
<div uib-slide ng-repeat="slide in slides track by slide.id" index="slide.id">
<img ng-src="{{slide.image}}">
</div>
</div>
<div class="row">
<div class="margin-top">
<div ng-repeat="slide in thumbnails">
<img ng-src="{{slide.image}}" ng-click="setActive(slide.id)">
</div>
</div>
</div>
并且setActive函数是:
$scope.thumbnails = $scope.slides.slice((0,5);
$scope.setActive = function(idx) {
$scope.active=idx;
}
单击缩略图时,滑块会正确显示所选图像。但是,只要我点击旋转木马箭头,缩略图的ng-click就会停止工作(该功能通过角度调用,但旋转木马不会滑动到所选图像)。我该如何解决这个问题?