MCPcopy Create free account
hub / github.com/angular/components / findModuleFromOptions

Function findModuleFromOptions

src/cdk/schematics/utils/ast.ts:71–88  ·  view source on GitHub ↗
(
  host: Tree,
  options: ComponentOptions,
)

Source from the content-addressed store, hash-verified

69
70/** Wraps the internal find module from options with undefined path handling */
71export async function findModuleFromOptions(
72 host: Tree,
73 options: ComponentOptions,
74): Promise<string | undefined> {
75 const workspace = await readWorkspace(host);
76
77 if (!options.project) {
78 options.project = Array.from(workspace.projects.keys())[0];
79 }
80
81 const project = workspace.projects.get(options.project)!;
82
83 if (options.path === undefined) {
84 options.path = `/${project.root}/src/app`;
85 }
86
87 return internalFindModule(host, options);
88}

Callers 7

addFormModulesToModuleFunction · 0.90
addTableModulesToModuleFunction · 0.90
addNavModulesToModuleFunction · 0.90
addNavModulesToModuleFunction · 0.90
addTreeModulesToModuleFunction · 0.90
buildComponentFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected