@@ -90,12 +90,16 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])
90
90
91
91
scope . $on ( $modalStack . NOW_CLOSING_EVENT , function ( e , setIsAsync ) {
92
92
var done = setIsAsync ( ) ;
93
- if ( $animateCss ) {
94
- $animateCss ( element , {
95
- removeClass : attrs . modalInClass
96
- } ) . start ( ) . then ( done ) ;
93
+ if ( scope . modalOptions . animation ) {
94
+ if ( $animateCss ) {
95
+ $animateCss ( element , {
96
+ removeClass : attrs . modalInClass
97
+ } ) . start ( ) . then ( done ) ;
98
+ } else {
99
+ $animate . removeClass ( element , attrs . modalInClass ) . then ( done ) ;
100
+ }
97
101
} else {
98
- $animate . removeClass ( element , attrs . modalInClass ) . then ( done ) ;
102
+ done ( ) ;
99
103
}
100
104
} ) ;
101
105
}
@@ -413,7 +417,8 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])
413
417
backdrop : modal . backdrop ,
414
418
keyboard : modal . keyboard ,
415
419
openedClass : modal . openedClass ,
416
- windowTopClass : modal . windowTopClass
420
+ windowTopClass : modal . windowTopClass ,
421
+ animation : modal . animation
417
422
} ) ;
418
423
419
424
openedClasses . put ( modalBodyClass , modalInstance ) ;
@@ -423,6 +428,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])
423
428
424
429
if ( currBackdropIndex >= 0 && ! backdropDomEl ) {
425
430
backdropScope = $rootScope . $new ( true ) ;
431
+ backdropScope . modalOptions = modal ;
426
432
backdropScope . index = currBackdropIndex ;
427
433
var angularBackgroundDomEl = angular . element ( '<div uib-modal-backdrop="modal-backdrop"></div>' ) ;
428
434
angularBackgroundDomEl . attr ( 'backdrop-class' , modal . backdropClass ) ;
0 commit comments