GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Angular SSR Setup denies accepting matrix params · Issue #31457 · angular/angular-cli

Angular SSR Setup denies accepting matrix params #31457

New issue
Copy link
New issue
Copy link
Closed
Bug
#31476
Closed
Angular SSR Setup denies accepting matrix params#31457
Bug
#31476
Copy link
Assignees
alan-agius4
Labels
area: @angular/ssrfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix

Description

@mumenthalers
mumenthalers
opened on Oct 14, 2025
Issue body actions

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

  1. alan-agius4
    transferred this issue fromangular/angularon Oct 14, 2025
  2. alan-agius4 commented on Oct 14, 2025

    @alan-agius4
    alan-agius4
    on Oct 14, 2025
    Collaborator
    More actions

    Hi @mumenthalers, whist I was able to reproduce on stackblitz I wasn't able to do so locally and hence it seems that this is an issue with their server configuration.

    $ curl http://localhost:4200/home\;foo\=bar
    
    <!DOCTYPE html><html lang="en"><head>
      <script type="module" src="/@vite/client"></script>
    
      <title>Demo: SSR Matrix Params Denial</title>
      <meta charset="UTF-8">
      <base href="/">
    </head>
    <body>
      <app-root ng-version="20.3.4" ng-server-context="ssr"><router-outlet></router-outlet><app-home><h2>home works!</h2><h3>Route Params:</h3><pre>{
    "foo": "bar"
    }</pre><a href="/home;foo=bar">add some matrix params</a><hr><button>browser refresh</button><router-outlet></router-outlet><!--container--></app-home><!--container--></app-root>
    <script src="main.js" type="module"></script>
    <link rel="modulepreload" href="home-routes-H6C3XXJA.js">
    
  3. alan-agius4
    closed this as not plannedon Oct 14, 2025
  4. mumenthalers commented on Oct 14, 2025

    @mumenthalers
    mumenthalers
    on Oct 14, 2025
    Author
    More actions

    @alan-agius4 is it possible you tested with my workaround enabled?

    I only used stackblitz to reproduce it with minimal setup but of course experienced it first locally.

    I just downloaded the project from stackblitz, run npm ci then npm start and then executed your curl command and got the error.

    Could you please look into it again?

    Locally I'm running it with:

    Angular CLI: 20.3.5
    Node: 22.19.0
    Package Manager: npm 10.9.3
    OS: darwin arm64
    
  5. alan-agius4 commented on Oct 14, 2025

    @alan-agius4
    alan-agius4
    on Oct 14, 2025
    Collaborator
    More actions

    @mumenthalers, I did un-comment the matcher

    Image
  6. mumenthalers commented on Oct 14, 2025

    @mumenthalers
    mumenthalers
    on Oct 14, 2025
    Author
    More actions

    @alan-agius4 but it does not work when using the path. What am I missing?

    Image
  7. alan-agius4 commented on Oct 14, 2025

    @alan-agius4
    alan-agius4
    on Oct 14, 2025
    Collaborator
    More actions

    Oh, I know see what you mean.

    Reacted by Simon Mumenthaler
  8. alan-agius4
    reopened this on Oct 14, 2025
  9. alan-agius4
    added
    type: bug/fix
    freq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarely
    severity3: broken
    area: @angular/ssr
    on Oct 14, 2025
  10. alan-agius4
    added the
    Bug
    issue type on Oct 14, 2025
  11. alan-agius4
    added a commit that references this issue on Oct 15, 2025

    fix(@angular/ssr): correctly handle routes with matrix parameters

    This issue will close once commit 912cc89 is merged into the 'main' branch.
    912cc89
  12. alan-agius4
    self-assigned this
    on Oct 15, 2025
  13. alan-agius4
    closed this as completedin #31476on Oct 16, 2025
  14. alan-agius4
    added 2 commits that reference this issue on Oct 16, 2025

    fix(@angular/ssr): correctly handle routes with matrix parameters

    This issue will close once commit 85c18b4 is merged into the 'main' branch.
    85c18b4

    fix(@angular/ssr): correctly handle routes with matrix parameters

    This issue will close once commit 3a28fb6 is merged into the 'main' branch.
    3a28fb6
  15. angular-automatic-lock-bot commented on Nov 16, 2025

    @angular-automatic-lock-bot
    angular-automatic-lock-botBot
    on Nov 16, 2025
    More actions

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  16. angular-automatic-lock-bot
    locked and limited conversation to collaborators on Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @alan-agius4
    alan-agius4

Labels

area: @angular/ssrfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix

Type

Bug

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.