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

Commit cf92eae

Browse files
committed
chore(carousel): clean up code style
1 parent e6f3b87 commit cf92eae

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

Diff for: src/carousel/carousel.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*/
99
angular.module('ui.bootstrap.carousel', [])
10-
.controller('CarouselController', ['$scope', '$element', '$interval', '$animate', function ($scope, $element, $interval, $animate) {
10+
.controller('CarouselController', ['$scope', '$element', '$interval', '$animate', function($scope, $element, $interval, $animate) {
1111
var self = this,
1212
slides = self.slides = $scope.slides = [],
1313
NEW_ANIMATE = angular.version.minor >= 4,
@@ -46,7 +46,7 @@ angular.module('ui.bootstrap.carousel', [])
4646

4747
$scope.$currentTransition = true;
4848
if (NEW_ANIMATE) {
49-
$animate.on('addClass', slide.$element, function (element, phase) {
49+
$animate.on('addClass', slide.$element, function(element, phase) {
5050
if (phase === 'close') {
5151
$scope.$currentTransition = null;
5252
$animate.off('addClass', element);
@@ -66,7 +66,7 @@ angular.module('ui.bootstrap.carousel', [])
6666
restartTimer();
6767
}
6868

69-
$scope.$on('$destroy', function () {
69+
$scope.$on('$destroy', function() {
7070
destroyed = true;
7171
});
7272

@@ -354,7 +354,7 @@ function ($injector, $animate) {
354354
}
355355

356356
return {
357-
beforeAddClass: function (element, className, done) {
357+
beforeAddClass: function(element, className, done) {
358358
// Due to transclusion, noTransition property is on parent's scope
359359
if (className == 'active' && element.parent() &&
360360
!element.parent().data(NO_TRANSITION)) {
@@ -398,22 +398,18 @@ function ($injector, $animate) {
398398
.start()
399399
.done(removeClassFn);
400400
} else {
401-
$animate.addClass(element, directionClass).then(function () {
401+
$animate.addClass(element, directionClass).then(function() {
402402
if (!stopped) {
403403
removeClassFn();
404404
}
405405
done();
406406
});
407407
}
408-
return function () {
408+
return function() {
409409
stopped = true;
410410
};
411411
}
412412
done();
413413
}
414414
};
415-
416-
}])
417-
418-
419-
;
415+
}]);

0 commit comments

Comments
 (0)