-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Dialog Component Instance #4815
Comments
Im assuming I need to use an emitter, however, I don;t think there is nice documentation on this. |
UPDATE: |
Fixes the `dialogRef.componentInstance` being cleaned up too early, causing it to be unavailable in the `afterClosed` callback. Fixes angular#4815.
Fixes the `dialogRef.componentInstance` being cleaned up too early, causing it to be unavailable in the `afterClosed` callback. Fixes angular#4815.
I think you need neither the componentInstance nor an EventEmitter to access the values in afterClose - simply pass them as parameter to the close method of the dialogRef |
Fixes the `dialogRef.componentInstance` being cleaned up too early, causing it to be unavailable in the `afterClosed` callback. Fixes #4815.
We are currently on 2.0.0-beta.10. componentInstance is null on quite a regular basis for most dialogs. Unfortunately, we could not pin down the cause. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
In Beta 6 (maybe 4 / 5), I cant seem to access anything from dialogRef.componentInstance.
What is the expected behavior?
e.g dialogRef.componentInstance.isSaved would return me the value of isSaved from the component.
What is the current behavior?
componentInstance is null, there is no way to access the inner variables of the dialog.
What are the steps to reproduce?
try using componentInstance after close
What is the use-case or motivation for changing an existing behavior?
I want to know the certain state of a dialog after close.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material Beta 6, Angular 4
The text was updated successfully, but these errors were encountered: