@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 | undefined; elementInjector?: Injector | undefined; projectableNodes?: Node[][] | undefined; }): ComponentRef<C>;
  
  
Jump to details