Visitar URL original
feat(router/testing): Add navigate method to RouterTestingHarness · Issue #71210 · angular/angular · GitHub
Skip to content

feat(router/testing): Add navigate method to RouterTestingHarness #71210

Description

@gabrielmethot

Feature Description

RouterTestingHarness exposes the navigateByUrl method, which only accepts a string.

I suggest adding a navigate method, similar to the one exposed by Router. This would allow passing initial configuration such as fragment and query params.

I would be willing to open a pull request to add the feature.

Use Case

The navigate method already offers good ergonomics for handling fragments and query params, but has no equivalent in the testing utils.

In tests, configuring initial fragment or query params requires injecting the router and performing an additional navigation, which is unnecessary boilerplate and differs from how such navigations are handled in source code.

A new method would help avoid boilerplate code and facilitate the creation of a proper initial URL.

Activity

  1. added
    area: coreIssues related to the framework runtime
    gemini-triagedLabel noting that an issue has been triaged by gemini
    on Oct 6, 2026
  2. atscott commented on Oct 6, 2026

    @atscott
    Contributor

    👍 agreed. Go ahead and send a pr over

  3. transferred this issue fromangular/componentson Oct 6, 2026
  4. added this to the needsTriage milestone on Oct 6, 2026
  5. modified the milestones: needsTriage, Backlog on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtimefeatureLabel used to distinguish feature request from other issuesgemini-triagedLabel noting that an issue has been triaged by geminineeds triage

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions