如何实现带角度ng-repeat的自举套管? [英] How to implement bootstrap corousel with angular ng-repeat?
本文介绍了如何实现带角度ng-repeat的自举套管?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试在内部转盘内使用ng-repeat时,转盘不能正常工作,如何将转盘与ng-repeat一起使用?
When I am trying to use ng-repeat inside corousel-inner the corousel is not working properly, how to use carousel with ng-repeat ?
推荐答案
不完全是,但看起来像您想要的。
Not exact but seems like what you want.
<div class="container" ng-show="ifImages">
<br>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators" ng-repeat="image in images">
<li data-target="#myCarousel" data-slide-to="$index" ng-class="{'active': $index == 0}"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox" ng-repeat="image in images">
<div class="item" ng-class="{'active': $index == 0}">
<img bn-lazy-src="{{image.fullPath}}" title="{{image.description}}" alt="missing" />
<div class="carousel-caption">
<h3>{{image.name}}</h3>
<p>{{image.description}}</p>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
这篇关于如何实现带角度ng-repeat的自举套管?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文