Open
Description
Reproduction
Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/components-issue-yp5k44?file=src/app/dialog-overview-example-dialog.html
Steps to reproduce:
- Run application, click on open dialog button
- Enter text and close dialog, repeat this step.
- Go to Chrome Memory tab and run head snapshot. View MyDialogComponent and there are more than one instance created.
- Refresh chrome tab
- Open dialog and close without entering into text area
- Go to Chrome Memory tab and run head snapshot. View MyDialogComponent and there is only one instance created.
Expected Behavior
What behavior were you expecting to see?
I could be reading the chrome head snapshot incorrectly but I would expect there to be 1 instance of the Dialog component (MyDialogComponent) regardless if I enter something into the text-area or not.
Actual Behavior
What behavior did you actually see?
The number of instances grows by 2 each time the dialog is opened and text is entered into the text-area.
Environment
- Angular: 10.1.0
- CDK/Material: 10.2.1
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows