MCPcopy
hub / github.com/angular/angular / processSegmentGroup

Method processSegmentGroup

packages/router/src/recognize.ts:157–178  ·  view source on GitHub ↗
(
    injector: EnvironmentInjector,
    config: Route[],
    segmentGroup: UrlSegmentGroup,
    outlet: string,
    parentRoute: ActivatedRouteSnapshot,
  )

Source from the content-addressed store, hash-verified

155 }
156
157 async processSegmentGroup(
158 injector: EnvironmentInjector,
159 config: Route[],
160 segmentGroup: UrlSegmentGroup,
161 outlet: string,
162 parentRoute: ActivatedRouteSnapshot,
163 ): Promise<TreeNode<ActivatedRouteSnapshot>[]> {
164 if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {
165 return this.processChildren(injector, config, segmentGroup, parentRoute);
166 }
167
168 const child = await this.processSegment(
169 injector,
170 config,
171 segmentGroup,
172 segmentGroup.segments,
173 outlet,
174 true,
175 parentRoute,
176 );
177 return child instanceof TreeNode ? [child] : [];
178 }
179
180 /**
181 * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if

Callers 2

matchMethod · 0.95
processChildrenMethod · 0.95

Calls 3

processChildrenMethod · 0.95
processSegmentMethod · 0.95
hasChildrenMethod · 0.45

Tested by

no test coverage detected