From f0358c692d56024349040d8c5302ebc98b887a36 Mon Sep 17 00:00:00 2001 From: Alex Chow Date: Tue, 27 Jan 2015 15:36:12 -0500 Subject: [PATCH] Utilize two-way binding to toggle show --- src/ng-modal.coffee | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ng-modal.coffee b/src/ng-modal.coffee index 65da273..e7c0579 100644 --- a/src/ng-modal.coffee +++ b/src/ng-modal.coffee @@ -41,9 +41,6 @@ app.directive 'modalDialog', ['ngModalDefaults', '$sce', (ngModalDefaults, $sce) scope.dialogStyle['width'] = attrs.width if attrs.width scope.dialogStyle['height'] = attrs.height if attrs.height - scope.hideModal = -> - scope.show = false - scope.$watch('show', (newVal, oldVal) -> if newVal && !oldVal document.getElementsByTagName("body")[0].style.overflow = "hidden"; @@ -58,10 +55,10 @@ app.directive 'modalDialog', ['ngModalDefaults', '$sce', (ngModalDefaults, $sce) template: """
-
+
-
+