MCPcopy Index your code
hub / github.com/angular/angular-cli / getRoutingModulePath

Function getRoutingModulePath

packages/schematics/angular/module/index.ts:119–128  ·  view source on GitHub ↗
(host: Tree, modulePath: string)

Source from the content-addressed store, hash-verified

117}
118
119function getRoutingModulePath(host: Tree, modulePath: string): string | undefined {
120 const routingModulePath =
121 modulePath.endsWith(ROUTING_MODULE_EXT_LEGACY) || modulePath.endsWith(ROUTING_MODULE_EXT)
122 ? modulePath
123 : modulePath
124 .replace(MODULE_EXT_LEGACY, ROUTING_MODULE_EXT_LEGACY)
125 .replace(MODULE_EXT, ROUTING_MODULE_EXT);
126
127 return host.exists(routingModulePath) ? routingModulePath : undefined;
128}
129
130function buildRoute(options: ModuleOptions, modulePath: string) {
131 const relativeModulePath = buildRelativeModulePath(options, modulePath);

Callers 1

index.tsFile · 0.85

Calls 1

existsMethod · 0.65

Tested by

no test coverage detected