Title: Resource `hasValue()` is false for a moment when using TransferState cached data, causing hydration to fail · Issue #62897 · angular/angular · GitHub
Open Graph Title: Resource `hasValue()` is false for a moment when using TransferState cached data, causing hydration to fail · Issue #62897 · angular/angular
X Title: Resource `hasValue()` is false for a moment when using TransferState cached data, causing hydration to fail · Issue #62897 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description A minimal reproduction demonstrating hydration issues when using @else and @empty blocks with the control flow syntax. The app fetches Pokem...
Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description A minimal reproduction demonstrating hydration issues when using @else and @empty blocks with the co...
X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description A minimal reproduction demonstrating hydration issues when using @else and @empty blocks with the co...
Opengraph URL: https://github.com/angular/angular/issues/62897
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Resource `hasValue()` is false for a moment when using TransferState cached data, causing hydration to fail","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncore\n\n### Is this a regression?\n\nNo\n\n### Description\n\nA minimal reproduction demonstrating hydration issues when using @else and @empty blocks with the control flow syntax. The app fetches Pokemon data (httpClient + rxResource + transfer state enabled) and displays three scenarios:\n\n1) Works: Uses separate @if blocks - hydration works correctly\n\n\u003cimg width=\"1026\" height=\"293\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/61d9a602-4170-4e3b-b587-d9b1539b05ff\" />\n\n2) Broken: Uses @if/@else blocks - hydration fails\n\n\u003cimg width=\"1026\" height=\"293\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/512b2e7c-08a0-464f-9fc9-5794a9609a7b\" />\n\n3) Broken: Uses @for/@empty blocks - hydration fails\n\n\u003cimg width=\"1026\" height=\"293\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/be2c7615-6f96-4fab-b1b9-fabd9a63f5dd\" />\n\nExpected: All components should hydrate properly\nActual: When using @else or @empty, components are not hydrating\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://github.com/zip-fa/ng20-new-hydration-issue\n\n### Please provide the exception or error you saw\n\n```true\n\n```\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nng version\n\n _ _ ____ _ ___\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\n / △ \\ | '_ \\ / _` | | | | |/ _` | '__| | | | | | |\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\n /_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\n |___/\n \n\nAngular CLI: 20.1.3\nNode: 24.2.0\nPackage Manager: npm 11.3.0\nOS: darwin arm64\n\nAngular: 20.1.3\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.2001.3\n@angular-devkit/core 20.1.3\n@angular-devkit/schematics 20.1.3\n@schematics/angular 20.1.3\nrxjs 7.8.2\ntypescript 5.8.3\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/zip-fa","@type":"Person","name":"zip-fa"},"datePublished":"2025-07-30T12:59:58Z","url":"https://github.com/angular/angular/issues/62897"}
| 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:5851b23a-9b64-b7e1-fdc7-ebe52c4357fb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC64:14700E:1666646:1C6AB9B:6B0133F0 |
| html-safe-nonce | 964c0e9e67c4bc7829b0b98d339f3335e61df31e6f9bbf11537712fe975c6820 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzY0OjE0NzAwRToxNjY2NjQ2OjFDNkFCOUI6NkIwMTMzRjAiLCJ2aXNpdG9yX2lkIjoiNjE2MzU4NTUyMTQ3MTQ1NzEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7af823a62b70f529e05076683ab4e8d5700884239e31d8cbdac9bbf6804889a5 |
| hovercard-subject-tag | issue:3276976283 |
| 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/62897/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f9149bfbf03ed01cf780030977bfcfbfe3a429ca1e0b83c2c053823017ba6323/angular/angular/issues/62897 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f9149bfbf03ed01cf780030977bfcfbfe3a429ca1e0b83c2c053823017ba6323/angular/angular/issues/62897 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description A minimal reproduction demonstrating hydration issues when using @else and @empty blocks with the co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zip-fa |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width