Title: SSG generates empty index.html if navigation in guard · Issue #31618 · angular/angular-cli · GitHub
Open Graph Title: SSG generates empty index.html if navigation in guard · Issue #31618 · angular/angular-cli
X Title: SSG generates empty index.html if navigation in guard · Issue #31618 · angular/angular-cli
Description: Which @angular/* package(s) are the source of the bug? platform-server Is this a regression? Yes Description Latest working version: 20.3.6 If a route that's configured to be prerendered, contains a guard which navigates somewhere else, ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? platform-server Is this a regression? Yes Description Latest working version: 20.3.6 If a route that's configured to be prerendered, contains ...
X Description: Which @angular/* package(s) are the source of the bug? platform-server Is this a regression? Yes Description Latest working version: 20.3.6 If a route that's configured to be prerendered, conta...
Opengraph URL: https://github.com/angular/angular-cli/issues/31618
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SSG generates empty index.html if navigation in guard","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nplatform-server\n\n### Is this a regression?\n\nYes\n\n### Description\n\nLatest working version: 20.3.6\n\nIf a route that's configured to be prerendered, contains a guard which navigates somewhere else, ssg generates an empty index.html\n\nIn the reproduction: \n- When a user navigates to /subroute he should be navigated to /subroute/subsub\n- No error message or hint that this is happening is thrown\n\nWorkaround:\n- disable the guard when platform is server\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://github.com/Schoko19961/angular-ssg-empty-index-html\n\n### Please provide the exception or error you saw\n\n```true\nNo exception or warning was logged\n```\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 20.3.7\nNode: 22.20.0\nPackage Manager: npm 10.9.3\nOS: linux x64\n \n\nAngular: 20.3.7\n... build, cli, common, compiler, compiler-cli, core, forms\n... platform-browser, platform-server, router, ssr\n\nPackage Version\n------------------------------------\n@angular-devkit/architect 0.2003.7\n@angular-devkit/core 20.3.7\n@angular-devkit/schematics 20.3.7\n@schematics/angular 20.3.7\nrxjs 7.8.2\ntypescript 5.9.3\nzone.js 0.15.1\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/Schoko19961","@type":"Person","name":"Schoko19961"},"datePublished":"2025-10-28T09:39:41Z","url":"https://github.com/angular/angular-cli/issues/31618"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d896d72c-b8e9-d654-b617-b88e657e6a51 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A016:3F22BC:F9CEF:166CE2:6AFDD8E5 |
| html-safe-nonce | 4fb3c36f1cc18591c1600f4204b164ef592210ee20d4681f0888cc5ff3461424 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDE2OjNGMjJCQzpGOUNFRjoxNjZDRTI6NkFGREQ4RTUiLCJ2aXNpdG9yX2lkIjoiNjUxODA3NDAzNjk5ODQ5NDQzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 67e60a7c85592aa71e5d0639e74f8f80a6ff1d0544cf978935bc4dce69871a45 |
| hovercard-subject-tag | issue:3561443874 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/31618/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7657d5236528e969d85ff341eaf99a74cef2ba62b14e6e1ca1e0c15324b24b27/angular/angular-cli/issues/31618 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7657d5236528e969d85ff341eaf99a74cef2ba62b14e6e1ca1e0c15324b24b27/angular/angular-cli/issues/31618 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? platform-server Is this a regression? Yes Description Latest working version: 20.3.6 If a route that's configured to be prerendered, contains ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Schoko19961 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9918bd4004419458bcd838065ac2a76b76ebd11705d73909fff5ab99e996fa23 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a231c174493a6a442c0b0544475c918b30128208 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width