MCPcopy Index your code
hub / github.com/angular/angular / createChildrenForEmptyPaths

Function createChildrenForEmptyPaths

packages/router/src/utils/config_matching.ts:179–193  ·  view source on GitHub ↗
(
  routes: Route[],
  primarySegment: UrlSegmentGroup,
)

Source from the content-addressed store, hash-verified

177}
178
179function createChildrenForEmptyPaths(
180 routes: Route[],
181 primarySegment: UrlSegmentGroup,
182): {[name: string]: UrlSegmentGroup} {
183 const res: {[name: string]: UrlSegmentGroup} = {};
184 res[PRIMARY_OUTLET] = primarySegment;
185
186 for (const r of routes) {
187 if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {
188 const s = new UrlSegmentGroup([], {});
189 res[getOutlet(r)] = s;
190 }
191 }
192 return res;
193}
194
195function containsEmptyPathMatchesWithNamedOutlets(
196 segmentGroup: UrlSegmentGroup,

Callers 1

splitFunction · 0.85

Calls 1

getOutletFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…