* Put each routes file's routes under the path that lazy-loads it, and read * constant path segments. Recomputed from each route's in-file path (its * qualified name), so a second run changes nothing.
(context: ResolutionContext)
| 1051 | * qualified name), so a second run changes nothing. |
| 1052 | */ |
| 1053 | postExtract(context: ResolutionContext): Node[] { |
| 1054 | const routes = context.getNodesByKind('route').filter(isAngularRoute); |
| 1055 | if (routes.length === 0) return []; |
| 1056 | const { prefixOf } = angularMounts(context, routes); |
| 1057 | const resolved = (pathText: string, file: string): string[] => resolvedSegments(pathText, file, context); |
| 1058 | const changed: Node[] = []; |
| 1059 | for (const route of routes) { |
| 1060 | const name = joinPath([...prefixOf(route.filePath), ...resolved(inFilePath(route), route.filePath)]); |
| 1061 | if (name !== route.name) changed.push({ ...route, name }); |
| 1062 | } |
| 1063 | return changed; |
| 1064 | }, |
| 1065 | |
| 1066 | resolve(ref: UnresolvedRef, context: ResolutionContext): ResolvedRef | null { |
| 1067 | const layout = LAYOUT_REF.exec(ref.referenceName); |
nothing calls this directly
no test coverage detected