title: How to load component dynamically using component name in angular2?
body: <p>I am currently loading angular components dynamically in my application using following code.</p>
  
  <pre class="lang-ts prettyprint-override"><code>export class WizardTabContentContainer {
    @ViewChild('target', { read: ViewContainerRef }) target: any;
    @Input() TabContent: any | string;
    cmpRef: ComponentRef&lt;any&gt;;
    private isViewInitialized: boolean = false;
  
    constructor(private componentFactoryResolver: ComponentFactoryResolver,   private compiler: Compiler) {
    }
  
    updateComponent() {
       if (!this.isViewInitialized) {
         return;
       }
       if (this.cmpRef) {
         this.cmpRef.destroy();
       }
       let factory = this.componentFactoryResolver.resolveComponentFactory(this.TabContent);
  
       this.cmpRef = this.target.createComponent(factory);
     }
  }
  </code></pre>
  <p>Here resolveComponentFactory function accepts component type. My question is, Is there any way I can load component using component name string e.g I have component defined as</p>
  <pre class="lang-ts prettyprint-override"><code>export class MyComponent{
  }
  </code></pre>
  <p>How can I add above component using component name string &quot;MyComponent&quot; instead of type?</p>