components
components copied to clipboard
fix(material/dialog): content directives picking up wrong ref for stacked mixed type dialogs
The dialog content directives try to resolve their closest dialog using DI, and if it fails (e.g. inside a template dialog), they fall back to resolving it through the DOM. This becomes problematic if the ng-template was declared inside another dialog component, because it'll pick up the declaration dialog, not the one that the button exists in.
These changes remove the resolution using DI and switch to only going through the DOM.
Fixes #21554.
I'll mark this as blocked for now. There should be a better way of doing it with injectors now.