Title: Non-blocking router resource cause jarring UI flash · Issue #70809 · angular/angular · GitHub
Open Graph Title: Non-blocking router resource cause jarring UI flash · Issue #70809 · angular/angular
X Title: Non-blocking router resource cause jarring UI flash · Issue #70809 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description The documentation for the new router resource says: When moving between views (or reloading the same view with new parameters), switching ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description The documentation for the new router resource says: When moving between views (or reloading the sa...
X Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description The documentation for the new router resource says: When moving between views (or reloading the sa...
Opengraph URL: https://github.com/angular/angular/issues/70809
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Non-blocking router resource cause jarring UI flash","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nrouter\n\n### Is this a regression?\n\nNo\n\n### Description\n\nThe documentation for the new router resource says:\n\n> When moving between views (or reloading the same view with new parameters), switching abruptly to a loading skeleton can create a jarring UI flash.\n\n> The router automatically masks intermediate `loading` and `reloading` states of resolved resources while a navigation is pending.\n\nThis is true for blocking resources: the router doesn't expose `null` or `undefined` data to the component while the resource is loading.\n\nHowever, when using a `nonBlocking` resource, the resource that is exposed to the component behaves like a traditional resource, thus causing the jarring UI flash: while the resource is loading, it loses its previous value.\n\nIMHO, it should at least be consistent with the behavior we get when using blocking resources, so that the behavior of the application doesn't radically change when switching from blocking to non-blocking resources. \nThe resource could switch to the `loading` status, but still keep its old value. \n\nThat would allow the component to do whatever it wants:\n\n- alternate between a loading indicator (when `isLoading()` returns `true`) and data (when `isLoading()` returns `false`) - which is the only possible behavior currently\n- show the current data when `hasValue()` returns `true`\n- show the current data when `hasValue()` returns `true`, and also a loading indicator when `isLoading()` returns `true`.\n\nBut I find the need to keep the current value while loading so frequent that Angular should provide a function or an option when creating the resource to do that.\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://stackblitz.com/edit/stackblitz-starters-kralrzfs?file=src%2Fmain.ts\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\nAngular CLI : 22.2.0-rc.0\nAngular : 22.2.0-rc.0\nNode.js : 24.19.0\nPackage Manager : npm 11.17.0\nOperating System : darwin x64\n\n┌───────────────────────────┬───────────────────┬───────────────────┐\n│ Package │ Installed Version │ Requested Version │\n├───────────────────────────┼───────────────────┼───────────────────┤\n│ @angular/build │ 22.2.0-rc.0 │ ^22.2.0-rc.0 │\n│ @angular/cli │ 22.2.0-rc.0 │ ^22.2.0-rc.0 │\n│ @angular/common │ 22.2.0-rc.0 │ ^22.2.0-next.0 │\n│ @angular/compiler │ 22.2.0-rc.0 │ ^22.2.0-next.0 │\n│ @angular/compiler-cli │ 22.2.0-rc.0 │ ^22.2.0-next.0 │\n│ @angular/core │ 22.2.0-rc.0 │ ^22.2.0-next.0 │\n│ @angular/forms │ 22.2.0-rc.0 │ ^22.2.0-next.0 │\n│ @angular/platform-browser │ 22.2.0-rc.0 │ ^22.2.0-next.0 │\n│ @angular/router │ 22.2.0-rc.0 │ ^22.2.0-next.0 │\n│ rxjs │ 7.8.2 │ ~7.8.0 │\n│ typescript │ 6.0.3 │ ~6.0.2 │\n│ vitest │ 5.0.1 │ ^5.0.0 │\n└───────────────────────────┴───────────────────┴───────────────────┘\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/jnizet","@type":"Person","name":"jnizet"},"datePublished":"2026-09-18T12:36:54Z","url":"https://github.com/angular/angular/issues/70809"}
| 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:4400515c-5c08-f21d-ba5a-b43d8aa5b3e4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DDDC:16EED3:3267FBA:403FEDB:6B01D8E1 |
| html-safe-nonce | b1d9f608370003e94f8228ac107b3650f26f72c62912e7d80c73caa01ab03f9d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERERDOjE2RUVEMzozMjY3RkJBOjQwM0ZFREI6NkIwMUQ4RTEiLCJ2aXNpdG9yX2lkIjoiNDA2MTU1NzU1Nzc5MjIwMDkzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 08e239724cb8e83e46bae089326acb22ce4662619d5f5d3300488f611059c08e |
| hovercard-subject-tag | issue:5499631661 |
| 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/70809/issue_layout |
| twitter:image | https://opengraph.githubassets.com/70733819a7da429c20359ecc6c26f5334f079456f9a19b13426f0515f1928aba/angular/angular/issues/70809 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/70733819a7da429c20359ecc6c26f5334f079456f9a19b13426f0515f1928aba/angular/angular/issues/70809 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description The documentation for the new router resource says: When moving between views (or reloading the sa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jnizet |
| 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