Skip to content

feat(router): add containsTree as public API - #70148

Open
brysonbw wants to merge 1 commit into
angular:mainfrom
brysonbw:feat-public-contains-tree-method-53129
Open

feat(router): add containsTree as public API#70148
brysonbw wants to merge 1 commit into
angular:mainfrom
brysonbw:feat-public-contains-tree-method-53129

Conversation

@brysonbw

Copy link
Copy Markdown
Contributor

Export containsTree from @angular/router to enable direct UrlTree subset matching.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

  • containsTree() was not included in public API for comparing URLs

Issue Number: #53129

What is the new behavior?

  • Re-exports containsTree() from @angular/router to allow developers to perform direct UrlTree subset matching

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Export containsTree from @angular/router to enable direct UrlTree subset matching.
@pullapprove
pullapprove Bot requested a review from atscott August 11, 2026 09:54
@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: router labels Aug 11, 2026
@ngbot ngbot Bot added this to the Backlog milestone Aug 11, 2026

@atscott atscott left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I guess I don't see any reason we can't do this. It's effectively public API already through isActive. That said, I wonder if it would be better to pull down the default patch options here rather than combining them above in isActive. Otherwise you would be required to define them fully when calling this function, which was a pain before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: router detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants