How to use ResolveComponentFactory() but with a string as a key
问题 what I'm trying to do: Use something similar to the "resolveComponentFactory()", but with a 'string' identifier to get Component Factories. Once obtained, start leverage the "createComponent(Factory)" method. Plnkr Example -> enter link description here In the example, you will see the "AddItem" method addItem(componentName:string):void{ let compFactory: ComponentFactory; switch(componentName){ case "image": compFactory = this.compFactoryResolver.resolveComponentFactory(PictureBoxWidget);