Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit f6c7931

Browse files
Foxandxsswesleycho
authored andcommittedOct 11, 2015
fix(carousel): make deprecated controller work with 1.3.x
Closes #4578
1 parent 1e3cbd8 commit f6c7931

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed
 

Diff for: ‎src/carousel/carousel.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/**
2-
* @ngdoc overview
3-
* @name ui.bootstrap.carousel
4-
*
5-
* @description
6-
* AngularJS version of an image carousel.
7-
*
1+
/**
2+
* @ngdoc overview
3+
* @name ui.bootstrap.carousel
4+
*
5+
* @description
6+
* AngularJS version of an image carousel.
7+
*
88
*/
99
angular.module('ui.bootstrap.carousel', [])
1010

@@ -200,7 +200,7 @@ angular.module('ui.bootstrap.carousel', [])
200200
} else if (currentIndex > index) {
201201
currentIndex--;
202202
}
203-
203+
204204
//clean the currentSlide when no more slide
205205
if (slides.length === 0) {
206206
self.currentSlide = null;
@@ -432,10 +432,10 @@ angular.module('ui.bootstrap.carousel')
432432
$log.warn('CarouselController is now deprecated. Use UibCarouselController instead.');
433433
}
434434

435-
return $controller('UibCarouselController', {
435+
angular.extend(this, $controller('UibCarouselController', {
436436
$scope: $scope,
437437
$element: $element
438-
});
438+
}));
439439
}])
440440

441441
.directive('carousel', ['$log', '$carouselSuppressWarning', function($log, $carouselSuppressWarning) {
@@ -493,4 +493,4 @@ angular.module('ui.bootstrap.carousel')
493493
});
494494
}
495495
};
496-
}]);
496+
}]);

0 commit comments

Comments
 (0)
This repository has been archived.