Visitar URL original
`ROUTES` isn't a valid parameter for `RouterModule.forRoot()` · Issue #71837 · angular/angular · GitHub
The Wayback Machine - https://web.archive.org/web/20261105151459/https://github.com/angular/angular/issues/71837
Skip to content

ROUTES isn't a valid parameter for RouterModule.forRoot() #71837

Open

Description

@SkohTV

Describe the problem that you experienced

RouterModule.forRoot(ROUTES) isn't valid
At least, if ROUTES is indeed https://next.angular.dev/api/router/ROUTES

Enter the URL of the topic with the problem

https://next.angular.dev/api/router/RouterModule#api

Describe what you were looking for in the documentation

I was looking for provideRouter([]) and got lost

Describe the actions that led you to experience the problem

No response

Describe what you want to experience that would fix the problem

If it's just a name collision, just chaning ROUTES to routes should be enough
If it's a bug, then idk

Add a screenshot if that helps illustrate the problem

No response

If this problem caused an exception or error, please paste it here

Argument of type 'InjectionToken<Route>' is not assignable to parameter of type 'Routes'.
Type 'InjectionToken<Route>' is missing the following properties from type 'Route[]': length, pop, push, concat, and 29 more.

If the problem is browser-specific, please specify the device, OS, browser, and version


Provide any additional information here in as much as detail as you can


Activity

  1. added this to the needsTriage milestone on Nov 5, 2026
  2. added this to the needsTriage milestone on Nov 5, 2026
  3. added
    open for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).
    on Nov 5, 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: routeropen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions