From 9e48c2b89ff7dbe69528799a839d602118ec725f Mon Sep 17 00:00:00 2001 From: Paul Pflugradt Date: Fri, 2 May 2014 12:52:03 +0200 Subject: [PATCH 1/2] workaround for nested transclude scope --- src/modal/modal.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modal/modal.js b/src/modal/modal.js index c753b5fc5b..1cfe5f5c2f 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -86,7 +86,10 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) templateUrl: function(tElement, tAttrs) { return tAttrs.templateUrl || 'template/modal/window.html'; }, - link: function (scope, element, attrs) { + link: function (scope, element, attrs, controller, transclude) { + transclude(scope.$parent, function(content) { + element.children("[ng-transclude]").append(content); + }); element.addClass(attrs.windowClass || ''); scope.size = attrs.size; @@ -98,6 +101,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) }); scope.close = function (evt) { + scope.$parent.$destroy(); var modal = $modalStack.getTop(); if (modal && modal.value.backdrop && modal.value.backdrop != 'static' && (evt.target === evt.currentTarget)) { evt.preventDefault(); From bcacf79dafd1569c0f4110fee66d760186558e28 Mon Sep 17 00:00:00 2001 From: Paul Pflugradt Date: Fri, 2 May 2014 12:59:21 +0200 Subject: [PATCH 2/2] singlequote --- src/modal/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modal/modal.js b/src/modal/modal.js index 1cfe5f5c2f..c8f59a83a7 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -88,7 +88,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) }, link: function (scope, element, attrs, controller, transclude) { transclude(scope.$parent, function(content) { - element.children("[ng-transclude]").append(content); + element.children('[ng-transclude]').append(content); }); element.addClass(attrs.windowClass || ''); scope.size = attrs.size;