This is the archived documentation for Angular v6. Please visit angular.io to see documentation for the current version of Angular.

getModuleFactory

Returns the NgModuleFactory with the given id, if it exists and has been loaded. Factories for modules that do not specify an id cannot be retrieved. Throws if the module cannot be found.

      
      getModuleFactory(id: string): NgModuleFactory<any>
    

Parameters

id

Type: string.

Returns

NgModuleFactory<any>