W3cubDocs

/Angular

NgModuleFactory

class deprecated

Deprecated: This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy JIT mode. See JIT API changes due to ViewEngine deprecation for additional context. Angular provides APIs that accept NgModule classes directly (such as PlatformRef.bootstrapModule and createNgModule), consider switching to those APIs instead of using factory-based ones.

abstract class NgModuleFactory<T> {
  abstract moduleType: Type<T>
  abstract create(parentInjector: Injector): NgModuleRef<T>
}

Properties

Property Description
abstract moduleType: Type<T> Read-Only

Methods

abstract create(parentInjector: Injector): NgModuleRef<T>

Parameters
parentInjector Injector
Returns

NgModuleRef<T>

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