From 8853bd8325ac1ddb4078aa1ecd4cf86c42f6d866 Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Tue, 4 Aug 2015 22:27:56 -0700 Subject: [PATCH] chore(modal): change to `$uibUnscheduledDestruction` - Change to `$uibUnscheduledDestruction` as per comment in #4097 --- src/modal/docs/readme.md | 2 +- src/modal/modal.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modal/docs/readme.md b/src/modal/docs/readme.md index 27904f5699..46cbbb18b7 100644 --- a/src/modal/docs/readme.md +++ b/src/modal/docs/readme.md @@ -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 diff --git a/src/modal/modal.js b/src/modal/modal.js index 89ab44134c..1fdfad3af8 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -528,7 +528,7 @@ angular.module('ui.bootstrap.modal', []) modalScope.$on('$destroy', function() { if (!modalScope.$$uibDestructionScheduled) { - modalScope.$dismiss('$uibModal'); + modalScope.$dismiss('$uibUnscheduledDestruction'); } });