fix(bio): fix dialog bug #132

See [this][https://github.com/angular/material/issues/1531] for more detailed information.
This commit is contained in:
Jacob Müller 2015-06-07 14:23:30 +02:00
parent e3e8bb5689
commit 1315b75787
1 changed files with 3 additions and 3 deletions

View File

@ -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:
'<md-dialog class="modal" aria-label="List dialog">' +
@ -43,4 +43,4 @@ angularIO.directive('biocard', function($rootScope, $timeout, $mdDialog) {
});
}
};
});
});