I have a component A that should normally be displayed without a close button. However, when I open component A in a dialog, I want to add a Close Button to close the dialog.
How can I implement this behavior in Angular? Is there an elegant way to determine if the component is open in a dialog so I can add a Close Button accordingly?
Thanks in advance for your assistance!
Here is my code:
https://stackblitz.com/edit/stackblitz-starters-p4pfnr?file=src%2Fapp%2Fb%2Fb.component.ts