components icon indicating copy to clipboard operation
components copied to clipboard

fix(material/dialog): content directives picking up wrong ref for stacked mixed type dialogs

Open crisbeto opened this issue 5 years ago • 1 comments

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.

crisbeto avatar Jan 13 '21 20:01 crisbeto

I'll mark this as blocked for now. There should be a better way of doing it with injectors now.

crisbeto avatar Mar 09 '22 09:03 crisbeto