• Overview
@angular/router

containsTree

function
stable

Determines if a UrlTree is contained within another UrlTree based on the provided matching options.

API

function containsTree(
  container: UrlTree,
  containee: UrlTree,
  options?: Partial<IsActiveMatchOptions> | undefined,
): boolean;
@paramcontainerUrlTree

The outer or reference UrlTree.

@paramcontaineeUrlTree

The target UrlTree to test against the container.

@paramoptionsPartial<IsActiveMatchOptions> | undefined

Optional, matching options:

  • paths: Defines how to compare URL segments ('exact' or 'subset'). Defaults to 'subset'.
  • matrixParams: Defines how to compare matrix parameters ('exact', 'subset', or 'ignored'). Defaults to 'ignored'.
  • queryParams: Defines how to compare query parameters ('exact', 'subset', or 'ignored'). Defaults to 'subset'.
  • fragment: Defines how to compare URL fragments ('exact' or 'ignored'). Defaults to 'ignored'.
@returnsboolean
Jump to details