Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have an Angular (9.1.4) project, which uses ng-bootstrap (6.1.0) to open dialogs. To my notice, whenever a modal opens, there is <div class='cdk-overlay-container' /> added to HTML.

Any idea where Angular adds this div, and how to get rid of it?

Thanks in advance!

question from:https://stackoverflow.com/questions/65880807/how-to-get-rid-of-cdk-overlay-container

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
418 views
Welcome To Ask or Share your Answers For Others

1 Answer

  • Angular material adds the CDK overlay. When you open modals with angular material then it adds class. Angular adds the modals div in body and not in app-root.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...