ComponentFactory

class

abstract class ComponentFactory<C> {
  abstract selector: string
  abstract componentType: Type<any>
  abstract ngContentSelectors: string[]
  abstract inputs: {...}
  abstract outputs: {...}
  abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: any, ngModule?: NgModuleRef<any>): ComponentRef<C>
}

Properties

Property Description
abstract selector: string Read-only.

The component's HTML selector.

abstract componentType: Type<any> Read-only.

The component's type

abstract ngContentSelectors: string[] Read-only.

Selector for all elements in the component.

abstract inputs: { propName: string; templateName: string; }[] Read-only.

The inputs of the component.

abstract outputs: { propName: string; templateName: string; }[] Read-only.

The outputs of the component.

Methods

Creates a new component.

abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: any, ngModule?: NgModuleRef<any>): ComponentRef<C>

Parameters
injector Injector
projectableNodes any[][]

Optional. Default is undefined.

rootSelectorOrNode any

Optional. Default is undefined.

ngModule NgModuleRef

Optional. Default is undefined.

Returns

ComponentRef<C>

© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v7.angular.io/api/core/ComponentFactory