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

Function equalSegmentGroups

packages/router/src/url_tree.ts:150–166  ·  view source on GitHub ↗
(
  container: UrlSegmentGroup,
  containee: UrlSegmentGroup,
  matrixParams: ParamMatchOptions,
)

Source from the content-addressed store, hash-verified

148}
149
150function equalSegmentGroups(
151 container: UrlSegmentGroup,
152 containee: UrlSegmentGroup,
153 matrixParams: ParamMatchOptions,
154): boolean {
155 if (!equalPath(container.segments, containee.segments)) return false;
156 if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {
157 return false;
158 }
159 if (container.numberOfChildren !== containee.numberOfChildren) return false;
160 for (const c in containee.children) {
161 if (!container.children[c]) return false;
162 if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))
163 return false;
164 }
165 return true;
166}
167
168function containsParams(container: Params, containee: Params): boolean {
169 return (

Callers

nothing calls this directly

Calls 2

equalPathFunction · 0.85
matrixParamsMatchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…