This repository has been archived by the owner on May 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(carousel): use
track by
in template
Closes #1723
- Loading branch information
1 parent
3e938bd
commit 0d4c2e2
Showing
3 changed files
with
7 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()"> | ||
<ol class="carousel-indicators" ng-show="slides().length > 1"> | ||
<li ng-repeat="slide in slides()" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li> | ||
<ol class="carousel-indicators" ng-show="slides.length > 1"> | ||
<li ng-repeat="slide in slides track by $index" ng-class="{active: isActive(slide)}" ng-click="select(slide)"></li> | ||
</ol> | ||
<div class="carousel-inner" ng-transclude></div> | ||
<a class="left carousel-control" ng-click="prev()" ng-show="slides().length > 1"><span class="icon-prev"></span></a> | ||
<a class="right carousel-control" ng-click="next()" ng-show="slides().length > 1"><span class="icon-next"></span></a> | ||
<a class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"><span class="icon-prev"></span></a> | ||
<a class="right carousel-control" ng-click="next()" ng-show="slides.length > 1"><span class="icon-next"></span></a> | ||
</div> |