我已经阅读了所有关于此的问题,但仍然发生在我身上。 在我的 html 中,我使用带旋转木马的 Angular ,我的问题是在 las 元素中,它不再循环。如果我单击左键而不是右键,它确实有效。 这是我的代码
<div id="filters-carousel" data-interval="false" class="container-fluid carousel slide issue-div-wrapper" data-ride="carousel">
<div class="container filters-carousel carousel-inner issue-div" role="listbox" ng-show="filterContent['{{key}}']" ng-repeat="(key, values) in filterContent.filters">
<ul class="item" ng-class="{active : $index == 0}" ng-repeat="v in values" ng-if="$index % 8 === 0">
<li ng-repeat="v in values.slice($index, $index + 8)" ng-class="{active: filterContent.isSelectedValue(key, v)}" ng-click="filterContent.addFilter(key, v)">
<a class="issue-btn btn-default">{{v}}</a>
</li>
</ul>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#filters-carousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon glyphicon-menu-left" aria-hidden="true"></span>
</a>
<a class="right carousel-control" href="#filters-carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon glyphicon-menu-right" aria-hidden="true"></span>
</a>
</div>
最佳答案
我不知道是否标记为以下链接的重复项,您使用的是 ngAnimate 吗?
看看: angularjs corousel stops working
It's a compatibility problem between ui.bootstrap and ngAnimate .... https://github.com/angular-ui/bootstrap/issues/1350
这里也是:https://github.com/angular-ui/bootstrap/issues/1565
但是有人发布了他的解决方案:
app.config(
['$animateProvider',
function ($animateProvider) {
$animateProvider.classNameFilter(/carousel/);
}]);
This means ngAnimate is disabled for all elements in the application with the carousel class.
可能是你的问题?希望对您有所帮助!
关于javascript - Bootstrap 轮播在最后一项之后停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36556323/