Skip to content

docs(router): document .. traversal and relativeTo pitfalls in router.navigate()#68176

Draft
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:docs/router_65657
Draft

docs(router): document .. traversal and relativeTo pitfalls in router.navigate()#68176
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:docs/router_65657

Conversation

@arturovt
Copy link
Copy Markdown
Contributor

Explain two non-obvious behaviors of the commands array in router.navigate():

  • Multiple '..' segments must be combined in the first array element (e.g. ['../../foo']), not spread across separate elements (e.g. ['..', '..', 'foo']), because the router only parses '..' from the first command string. Subsequent elements are treated as literal path segments, causing a navigation error.
  • A leading '/' in the first command makes navigation absolute and silently ignores the relativeTo option entirely.

Closes #65657

….navigate()

Explain two non-obvious behaviors of the commands array in router.navigate():

- Multiple '..' segments must be combined in the first array element
  (e.g. ['../../foo']), not spread across separate elements
  (e.g. ['..', '..', 'foo']), because the router only parses '..'
  from the first command string. Subsequent elements are treated as
  literal path segments, causing a navigation error.
- A leading '/' in the first command makes navigation absolute and
  silently ignores the relativeTo option entirely.

Closes angular#65657
@angular-robot angular-robot bot added area: docs Related to the documentation area: router labels Apr 13, 2026
@ngbot ngbot bot added this to the Backlog milestone Apr 13, 2026
@thePunderWoman
Copy link
Copy Markdown
Contributor

Woah, looks like you've opened a lot of issues/PRs recently. While we appreciate contributions from the community, triaging and reviewing a large influx of content in a short time period takes time away from other ongoing projects. As a result, we're closing these issues/PRs to maintain the team's focus.

Note that this is not necessarily a rejection of the goals or direction of any of these contributions in particular, so much as a reflection of the team's current capacity and priorities.

You are welcome to open a smaller subset of issues/PRs in accordance with our policy focused on the most important and impactful contributions and we will do our best to prioritize a response as soon as possible.

@arturovt arturovt deleted the docs/router_65657 branch April 13, 2026 16:54
@arturovt arturovt restored the docs/router_65657 branch April 13, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Related to the documentation area: router

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(router): router.navigate() method does not explain some usages

2 participants