Skip to content

Angular SSR Setup denies accepting matrix params #31457

Description

@mumenthalers

Which @angular/* package(s) are the source of the bug?

@angular/ssr

Is this a regression?

Yes

Description

Angular SSR seems not to accept matrix params in URLs.

Reproduction: App with SSR; then add Matrix params to the URL through the use of angulars routerLink like <a [routerLink]="['.', {foo:'bar'}]">...</a> - when clicked in running angular app it will work as expected since it runs only in the browser.
when trying to request this new url with matrix params from the running ssr server it will fail because of those matrix params.

/home --> works
/home;foo=bar --> not working

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-ssr-matrix-params-denial

Please provide the exception or error you saw

`404 - Not Found`

-- if there is a redirect configured with `**` in the angular `Routes` it would return a 302 to given route.

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 20.3.5
Node: 20.19.1
Package Manager: npm 10.8.2
OS: linux x64
    

Angular: 20.3.4
... common, compiler, compiler-cli, core, platform-browser
... platform-server, router

Package                      Version
------------------------------------
@angular-devkit/architect    0.2003.5
@angular-devkit/core         20.3.5
@angular-devkit/schematics   20.3.5
@angular/build               20.3.5
@angular/cli                 20.3.5
@angular/ssr                 20.3.5
@schematics/angular          20.3.5
rxjs                         7.8.2
typescript                   5.9.3

Anything else?

When changing the route definition from using path to matcher function which does essentially the same as the path it works as expected.

{
  {
    // path: 'home',
    matcher: ([s0]) => (s0?.path === 'home' ? { consumed: [s0] } : null),
    loadChildren: () => import('./routes/home/home-routes')
  }
}

Activity

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

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions