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

Function buildRoute

packages/schematics/angular/module/index.ts:130–136  ·  view source on GitHub ↗
(options: ModuleOptions, modulePath: string)

Source from the content-addressed store, hash-verified

128}
129
130function buildRoute(options: ModuleOptions, modulePath: string) {
131 const relativeModulePath = buildRelativeModulePath(options, modulePath);
132 const moduleName = `${strings.classify(options.name)}Module`;
133 const loadChildren = `() => import('${relativeModulePath}').then(m => m.${moduleName})`;
134
135 return `{ path: '${options.route}', loadChildren: ${loadChildren} }`;
136}
137
138const moduleSchematic: RuleFactory<ModuleOptions> = createProjectSchematic(
139 async (options, { tree }) => {

Callers 1

Calls 1

buildRelativeModulePathFunction · 0.85

Tested by

no test coverage detected