Closed Luftzig closed 8 years ago
Nitpick: You have a typo in your commit message / PR description (destory vs destroy) - can make grepping history difficult.
Are you sure this is the right solution? I figured the $destroy is in there because of DOM manipulation - so would this not introduce a leak?
A recent commit (https://github.com/m-e-conroy/angular-dialog-service/commit/e122efebe9bf06c6703e3452ddb219e8da86fa63) added an option for animation. @m-e-conroy can comment further, but should this maybe use that flag to determine if it should call $scope.$destroy
(if animations are off) or use the $animate
service to wait for 'leave' and then call the destroy? (see http://stackoverflow.com/questions/18937758/how-can-i-defer-the-scope-element-destroy-event-so-i-can-animate-the-elemen)
I'm not sure how I feel about this, I'm not seeing it cause an error or anything if the $scope is already destroyed. My inclination is to leave it for now, till I get more time to go through it - currently on a tight deadline this summer.
Can you please reopen this if it's still an issue with the latest version.
ui-bootstrap 0.13.0 handles destroying the scope itself. Haven't tested with 0.12.1, though.