MCPcopy
hub / github.com/angular/angular-cli / addImportToModule

Function addImportToModule

packages/schematics/angular/utility/ast-utils.ts:499–506  ·  view source on GitHub ↗
(
  source: ts.SourceFile,
  modulePath: string,
  classifiedName: string,
  importPath: string,
)

Source from the content-addressed store, hash-verified

497 * Custom function to insert an NgModule into NgModule imports. It also imports the module.
498 */
499export function addImportToModule(
500 source: ts.SourceFile,
501 modulePath: string,
502 classifiedName: string,
503 importPath: string,
504): Change[] {
505 return addSymbolToNgModuleMetadata(source, modulePath, 'imports', classifiedName, importPath);
506}
507
508/**
509 * Custom function to insert a provider into NgModule. It also imports it.

Callers 1

addImportToNgModuleFunction · 0.90

Calls 1

Tested by

no test coverage detected