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

Commit

Permalink
chore(modal): change to $uibUnscheduledDestruction
Browse files Browse the repository at this point in the history
- Change to `$uibUnscheduledDestruction` as per comment in #4097
  • Loading branch information
wesleycho committed Aug 5, 2015
1 parent 0b37f08 commit 8853bd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modal/docs/readme.md
Expand Up @@ -35,7 +35,7 @@ In addition the scope associated with modal's content is augmented with 2 method

Those methods make it easy to close a modal window without a need to create a dedicated controller.

If the $scope is destroyed via unexpected mechanism, such as it being passed in the modal options and a $route/$state transition occurs, the modal will be dismissed with the value `$uibModal`.
If the $scope is destroyed via unexpected mechanism, such as it being passed in the modal options and a $route/$state transition occurs, the modal will be dismissed with the value `$uibUnscheduledDestruction`.

Finally, a `modal.closing` event is broadcast to the modal scope before the modal closes. If the listener calls
preventDefault on the event, then the modal will remain open. The $close and $dismiss methods return true if the
Expand Down
2 changes: 1 addition & 1 deletion src/modal/modal.js
Expand Up @@ -528,7 +528,7 @@ angular.module('ui.bootstrap.modal', [])

modalScope.$on('$destroy', function() {
if (!modalScope.$$uibDestructionScheduled) {
modalScope.$dismiss('$uibModal');
modalScope.$dismiss('$uibUnscheduledDestruction');
}
});

Expand Down

0 comments on commit 8853bd8

Please sign in to comment.