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

Function addProviderToModule

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

Source from the content-addressed store, hash-verified

509 * Custom function to insert a provider into NgModule. It also imports it.
510 */
511export function addProviderToModule(
512 source: ts.SourceFile,
513 modulePath: string,
514 classifiedName: string,
515 importPath: string,
516): Change[] {
517 return addSymbolToNgModuleMetadata(source, modulePath, 'providers', classifiedName, importPath);
518}
519
520/**
521 * Custom function to insert an export into NgModule. It also imports it.

Callers 1

ast-utils_spec.tsFile · 0.90

Calls 1

Tested by

no test coverage detected