Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

NgModuleFactory

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>