@angular/core

createComponent

function

Creates a ComponentRef instance based on provided component type and a set of options.

  
    function createComponent<C>(  component: Type<C>,  options: { environmentInjector: EnvironmentInjector; hostElement?: Element; elementInjector?: Injector; projectableNodes?: Node[][]; }): ComponentRef<C>;
  
  
Jump to details