This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ angular.module('ui.bootstrap.carousel', [])
20
20
var destroyed = false ;
21
21
/* direction: "prev" or "next" */
22
22
self . select = $scope . select = function ( nextSlide , direction ) {
23
- var nextIndex = self . indexOfSlide ( nextSlide ) ;
23
+ var nextIndex = $scope . indexOfSlide ( nextSlide ) ;
24
24
//Decide direction if it's not given
25
25
if ( direction === undefined ) {
26
26
direction = nextIndex > self . getCurrentIndex ( ) ? 'next' : 'prev' ;
@@ -86,7 +86,7 @@ angular.module('ui.bootstrap.carousel', [])
86
86
} ;
87
87
88
88
/* Allow outside people to call indexOf on slides array */
89
- self . indexOfSlide = function ( slide ) {
89
+ $scope . indexOfSlide = function ( slide ) {
90
90
return angular . isDefined ( slide . index ) ? + slide . index : slides . indexOf ( slide ) ;
91
91
} ;
92
92
Original file line number Diff line number Diff line change 1
1
< div ng-mouseenter ="pause() " ng-mouseleave ="play() " class ="carousel " ng-swipe-right ="prev() " ng-swipe-left ="next() ">
2
2
< ol class ="carousel-indicators " ng-show ="slides.length > 1 ">
3
- < li ng-repeat ="slide in slides | orderBy:'index' track by $index " ng-class ="{active: isActive(slide)} " ng-click ="select(slide) "> </ li >
3
+ < li ng-repeat ="slide in slides | orderBy:indexOfSlide track by $index " ng-class ="{active: isActive(slide)} " ng-click ="select(slide) "> </ li >
4
4
</ ol >
5
5
< div class ="carousel-inner " ng-transclude > </ div >
6
6
< a class ="left carousel-control " ng-click ="prev() " ng-show ="slides.length > 1 "> < span class ="glyphicon glyphicon-chevron-left "> </ span > </ a >
You can’t perform that action at this time.
0 commit comments