W3cubDocs

/Angular

getNgModuleById

function

Returns the NgModule class with the given id (specified using @NgModule.id field), if it exists and has been loaded. Classes for NgModules that do not specify an id cannot be retrieved. Throws if an NgModule cannot be found.

getNgModuleById<T>(id: string): Type<T>

Parameters
id string
Returns

Type<T>

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