填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫Home

ComponentFactoryResolver

一個簡單的登錄檔,它將 Components 對映到產生的 ComponentFactory 類別,該類別可用於建立元件的實例。用於獲取給定元件型別的工廠,然後使用工廠的 create() 方法建立該型別的元件。

A simple registry that maps Components to generated ComponentFactory classes that can be used to create instances of components. Use to obtain the factory for a given component type, then use the factory's create() method to create a component of that type.

      
      abstract class ComponentFactoryResolver {
  static NULL: ComponentFactoryResolver
  abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>
}
    

參見

靜態屬性

屬性說明
static NULL: ComponentFactoryResolver

方法

檢索能建立給定型別的元件的工廠物件。

Retrieves the factory object that creates a component of the given type.

      
      abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>
    
引數
component Type

元件型別。

The component type.

返回值

ComponentFactory<T>