-
Notifications
You must be signed in to change notification settings - Fork 6.7k
refactor(modal): use ngAnimate for animation #2724
refactor(modal): use ngAnimate for animation #2724
Conversation
This would be very cool thing! Can't wait! |
|
||
domEl.bind(transitionEndEventName, function () { | ||
$timeout.cancel(timeout); | ||
domEl.on('$animate:close', function closeFn() { | ||
afterAnimating(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May want to do this via scope.$evalAsync .
957ceab
to
cd30758
Compare
This code is ready to merge. It's just blocked on #2699 as the carousel is broken after adding ngAnimate. |
Can we get this merged? |
I'd like to see it merged as well. :) |
@chrisirhc - it can no longer merge automatically. |
cd30758
to
5d85752
Compare
Rebased. Now if anyone can take a look, I'll merge this. |
$timeout.cancel(timeout); | ||
afterAnimating(); | ||
scope.$apply(); | ||
// TODO: use .one when upgrading to >= 1.2.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could version sniff (angular.version.major
, angular.version.minor
, and angular.version.dot
) here to handle the differences properly - thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, since we're requiring 1.3 after this release, .one is already usable. I'll remove this and use .one.
Other than that one minor comment (may be a non-issue), this PR LGTM. |
5d85752
to
833fffa
Compare
- Fix scope.$apply call not working previously because scope was already destroyed. Use $rootScope instead. - Move $destroy call nearer to the dom removal. - Remove fallback timer (emulateTime param) Fixes angular-ui#2585 Fixes angular-ui#2674 Fixes angular-ui#2536 Fixes angular-ui#2790 Fixes angular-ui#3182 Closes angular-ui#2724
833fffa
to
0d8820b
Compare
- Fix scope.$apply call not working previously because scope was already destroyed. Use $rootScope instead. - Move $destroy call nearer to the dom removal. - Remove fallback timer (emulateTime param) Fixes angular-ui#2585 Fixes angular-ui#2674 Fixes angular-ui#2536 Fixes angular-ui#2790 Fixes angular-ui#3182 Closes angular-ui#2724
- Fix scope.$apply call not working previously because scope was already destroyed. Use $rootScope instead. - Move $destroy call nearer to the dom removal. - Remove fallback timer (emulateTime param) Fixes angular-ui#2585 Fixes angular-ui#2674 Fixes angular-ui#2536 Fixes angular-ui#2790 Fixes angular-ui#3182 Closes angular-ui#2724
Supercedes #1772
This makes use of the new
$animate:close
event to determine that the animation is done instead of using$transition
. There are minimal changes to the current code and there's one fix and the removal of some timers.