I need to pass a component name as argument to a function and receive it and use it. But only string is received. Below is the code
(click)="this.myapp.openModal('AddContactModelComponent','xl')"
I am receiving it here to use as component
 openModal(component:any,size:string) {
    // const modalRef = this.modalService.open(ModalComponent);
    const modalRef = this.modalService.open(
      component,
      {
       size: size, 
      });
      this.modal_title ='test';
  }