MCPcopy Create free account
hub / github.com/angular/angular / containsTree

Function containsTree

packages/router/src/url_tree.ts:153–168  ·  view source on GitHub ↗
(
  container: UrlTree,
  containee: UrlTree,
  options?: Partial<IsActiveMatchOptions>,
)

Source from the content-addressed store, hash-verified

151 * @publicApi
152 */
153export function containsTree(
154 container: UrlTree,
155 containee: UrlTree,
156 options?: Partial<IsActiveMatchOptions>,
157): boolean {
158 const matchOptions: IsActiveMatchOptions = {
159 ...subsetMatchOptions,
160 ...(options || {}),
161 };
162
163 return (
164 pathCompareMap[matchOptions.paths](container.root, containee.root, matchOptions.matrixParams) &&
165 paramCompareMap[matchOptions.queryParams](container.queryParams, containee.queryParams) &&
166 !(matchOptions.fragment === 'exact' && container.fragment !== containee.fragment)
167 );
168}
169
170function equalParams(container: Params, containee: Params): boolean {
171 // TODO: This does not handle array params correctly.

Callers 3

url_tree.spec.tsFile · 0.90
isActiveMethod · 0.90
isActiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected