How can i implement common new Window Component in Angular 15?

I’m using angular 15.

I want to create a new common window component.
For example

<pop-up-window #windowComponent>
  <div popupContent>
    <div>plz show me the contents...</div>
  </div>
</pop-up-window>

and when the user presses a certain button, I want the something-content component to appear in a new window.

But when I get to the window, I don’t see my component in the new window. Also, ComponentFactoryResolver is deprecated, so I’m not sure how to implement it.

I’d love to hear from anyone who has experience with this.

Someone please help me out…plz…♥

I want a common component that can launch a new window, and that will display the component that each user injects as content in a new window pane.