feat(router): add containsTree as public API - #70148
Open
brysonbw wants to merge 1 commit into
Open
Conversation
Export containsTree from @angular/router to enable direct UrlTree subset matching.
atscott
reviewed
Aug 11, 2026
atscott
left a comment
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?
What is the current behavior?
containsTree()was not included in public API for comparing URLsIssue Number: #53129
What is the new behavior?
containsTree()from @angular/router to allow developers to perform directUrlTreesubset matchingDoes this PR introduce a breaking change?
Other information