New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$mdDialog scope: $scope only has single use #5846

Closed
mantissa7 opened this Issue Nov 20, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@mantissa7

mantissa7 commented Nov 20, 2015

Closed in #1531 but still an issue pertaining to re-usability.

I want to create a directive to allow me to open a generic dialog by just passing a template path for templateUrl:

I tried both with a directive and using $scope.popup=function(path){}, however when passing scope:$scopethe dialog will only work once, and then the action no longer responds.

I am currently working around this issue by using scope:$scope.$new();

@danjarvis

This comment has been minimized.

Show comment
Hide comment
@danjarvis

danjarvis Nov 23, 2015

Contributor

I didn't read through #1531 yet, but have you tried setting preserveScope to true?

Contributor

danjarvis commented Nov 23, 2015

I didn't read through #1531 yet, but have you tried setting preserveScope to true?

@mantissa7

This comment has been minimized.

Show comment
Hide comment
@mantissa7

mantissa7 Nov 23, 2015

Ahh, brilliant. Yes that works.

mantissa7 commented Nov 23, 2015

Ahh, brilliant. Yes that works.

@mantissa7 mantissa7 closed this Nov 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment