From 1315b757876e0cabb233e31c4d210391e148d1fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Sun, 7 Jun 2015 14:23:30 +0200 Subject: [PATCH] fix(bio): fix dialog bug #132 See [this][https://github.com/angular/material/issues/1531] for more detailed information. --- public/resources/js/directives/bio.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/resources/js/directives/bio.js b/public/resources/js/directives/bio.js index 28f5daef19..e968abcb98 100644 --- a/public/resources/js/directives/bio.js +++ b/public/resources/js/directives/bio.js @@ -2,7 +2,7 @@ angularIO.directive('biocard', function($rootScope, $timeout, $mdDialog) { return { restrict: 'A', scope: {}, - link: function (scope, element, attrs) { + link: function(scope, element, attrs) { // SET SCOPE VALUES scope.name = attrs.name; scope.pic = attrs.pic; @@ -20,7 +20,7 @@ angularIO.directive('biocard', function($rootScope, $timeout, $mdDialog) { $mdDialog.show({ parent: angular.element(document.body), targetEvent: $event, - scope: scope, // use parent scope in template + scope: scope.$new(), // Uses prototypal inheritance to gain access to parent scope preserveScope: true, template: '' + @@ -43,4 +43,4 @@ angularIO.directive('biocard', function($rootScope, $timeout, $mdDialog) { }); } }; -}); \ No newline at end of file +});