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

Commit

Permalink
fix(carousel): make deprecated controller work with 1.3.x
Browse files Browse the repository at this point in the history
Closes #4578
  • Loading branch information
Foxandxss authored and wesleycho committed Oct 11, 2015
1 parent 1e3cbd8 commit f6c7931
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/carousel/carousel.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* @ngdoc overview
* @name ui.bootstrap.carousel
*
* @description
* AngularJS version of an image carousel.
*
/**
* @ngdoc overview
* @name ui.bootstrap.carousel
*
* @description
* AngularJS version of an image carousel.
*
*/
angular.module('ui.bootstrap.carousel', [])

Expand Down Expand Up @@ -200,7 +200,7 @@ angular.module('ui.bootstrap.carousel', [])
} else if (currentIndex > index) {
currentIndex--;
}

//clean the currentSlide when no more slide
if (slides.length === 0) {
self.currentSlide = null;
Expand Down Expand Up @@ -432,10 +432,10 @@ angular.module('ui.bootstrap.carousel')
$log.warn('CarouselController is now deprecated. Use UibCarouselController instead.');
}

return $controller('UibCarouselController', {
angular.extend(this, $controller('UibCarouselController', {
$scope: $scope,
$element: $element
});
}));
}])

.directive('carousel', ['$log', '$carouselSuppressWarning', function($log, $carouselSuppressWarning) {
Expand Down Expand Up @@ -493,4 +493,4 @@ angular.module('ui.bootstrap.carousel')
});
}
};
}]);
}]);

0 comments on commit f6c7931

Please sign in to comment.