createInjector

Create a new Injector which is configured using a defType of InjectorType<any>s.

createInjector(defType: any, parent: Injector | null = null, additionalProviders: StaticProvider[] | null = null): Injector

参数

defType

Type: any.

parent

Type: Injector | null.

可选. 默认值是 null.

additionalProviders

Type: StaticProvider[] | null.

可选. 默认值是 null.

返回值

Injector