Change where modals and toasts are rendered in DOM (v6)

Does anyone have experience changing where modals and toasts are rendered in the DOM to give some pointers on what I should override?

Long story short our organization embeds Ionic apps into our CMS pages for a unified experience and I need to render modals and toasts at the body level instead of the app level. Currently modals and toasts render within the embed area instead of the entire window.

Menus were pretty easy to solve (ViewContainerRef and DOCUMENT append) but I would like to use the Ionic Modal and Toast Controllers for programmatic control.

There is an feature request for this: feat: customize where modal is appended to · Issue #24198 · ionic-team/ionic-framework · GitHub

Thanks! I’m glad to know I’m not the only one who needs it!