I'm trying to create format feature in angular where the format name is passed to a format child component. This format component is created via
let componentFactory = componentFactoryResolver.resolveComponentFactory(typeOfFormatComponent);
So, to make it configurable I need to pass the typeOfFormatComponent as a string - say - 'AddressFormatComponent'.
How do I turn the string 'AddressFormatComponent' into the type AddressFormatComponent for the resolveComponentFactory call?