• Overview
@angular/core

ComponentFactory

Class
Deprecated

Base class for a factory that can create a component dynamically. Instantiate a factory for a given type of component with resolveComponentFactory(). Use the resulting ComponentFactory.create() method to create a component of that type.

  
    abstract class ComponentFactory<C> {}
  
  

selector

string

The component's HTML selector.

componentType

Type<any>

The type of component the factory will create.

ngContentSelectors

string[]

Selector for all elements in the component.

inputs

{ propName: string; templateName: string; transform?: ((value: any) => any) | undefined; isSignal: boolean; }[]

The inputs of the component.

outputs

{ propName: string; templateName: string; }[]

The outputs of the component.

create

Creates a new component.

@paraminjectorInjector
@paramprojectableNodesany[][] | undefined
@paramrootSelectorOrNodeany
@paramenvironmentInjectorEnvironmentInjector | NgModuleRef<any> | undefined
@returnsComponentRef<C>
Jump to details