amend($ionicModal): if hardwareBackButtonClose false, back button is noop

Addresses #1397
This commit is contained in:
Andrew Joslin
2014-06-05 07:28:28 -06:00
parent 53af788da9
commit 9942045fb2
3 changed files with 10 additions and 8 deletions

View File

@@ -128,12 +128,10 @@ function($rootScope, $document, $compile, $timeout, $ionicPlatform, $ionicTempla
.removeClass('ng-leave ng-leave-active');
self._isShown = true;
self._deregisterBackButton = self.hardwareBackButtonClose ?
$ionicPlatform.registerBackButtonAction(
angular.bind(self, self.hide),
PLATFORM_BACK_BUTTON_PRIORITY_MODAL
) :
angular.noop;
self._deregisterBackButton = $ionicPlatform.registerBackButtonAction(
self.hardwareBackButtonClose ? angular.bind(self, self.hide) : angular.noop,
PLATFORM_BACK_BUTTON_PRIORITY_MODAL
);
self._isOpenPromise = $q.defer();