diff --git a/src/modal/modal.js b/src/modal/modal.js index 2c2511f1fa..ddd924ff47 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -103,8 +103,8 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap']) /** * A helper directive for the $modal service. It creates a backdrop element. */ - .directive('uibModalBackdrop', ['$animateCss', '$injector', '$uibModalStack', - function($animateCss, $injector, $modalStack) { + .directive('uibModalBackdrop', ['$animate', '$injector', '$uibModalStack', + function($animate, $injector, $modalStack) { return { replace: true, templateUrl: 'uib/template/modal/backdrop.html', @@ -116,16 +116,12 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap']) function linkFn(scope, element, attrs) { if (attrs.modalInClass) { - $animateCss(element, { - addClass: attrs.modalInClass - }).start(); + $animate.addClass(element, attrs.modalInClass); scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) { var done = setIsAsync(); if (scope.modalOptions.animation) { - $animateCss(element, { - removeClass: attrs.modalInClass - }).start().then(done); + $animate.removeClass(element, attrs.modalInClass).then(done); } else { done(); }