bug(DomPortalOutlet): hasAttached returns false after attachComponentPortal #22370
Labels
area: cdk/portal
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Reproduction
Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/angular-ivy-b4babe?file=src/app/app.component.ts
Steps to reproduce:
Expected Behavior
What behavior were you expecting to see?
Return true.
Actual Behavior
What behavior did you actually see?
Return false.
Environment
Notes
The attach works fine, the issue happens because calling attachComponentPortal directly won't set _attachedPortal and hasAttached won't work as expected. A solution would be the attachs specific methods set _attachedPortal or make the attaches methods private if they are not meant to be called.
The text was updated successfully, but these errors were encountered: