Title: Support `@loading` block on `@for` block · Issue #53185 · angular/angular · GitHub
Open Graph Title: Support `@loading` block on `@for` block · Issue #53185 · angular/angular
X Title: Support `@loading` block on `@for` block · Issue #53185 · angular/angular
Description: Which @angular/* package(s) are relevant/related to the feature request? core Description It would be a great addition if the @for block would support the @loading block with the same functionality as on the @defer block. This would be u...
Open Graph Description: Which @angular/* package(s) are relevant/related to the feature request? core Description It would be a great addition if the @for block would support the @loading block with the same functionality...
X Description: Which @angular/* package(s) are relevant/related to the feature request? core Description It would be a great addition if the @for block would support the @loading block with the same functionality...
Opengraph URL: https://github.com/angular/angular/issues/53185
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support `@loading` block on `@for` block","articleBody":"### Which @angular/* package(s) are relevant/related to the feature request?\n\ncore\n\n### Description\n\nIt would be a great addition if the `@for` block would support the `@loading` block with the same functionality as on the `@defer` block.\r\nThis would be useful for cases where data is loaded asynchronously.\n\n### Proposed solution\n\nVery simple example:\r\n```js\r\n@for (entry of entries | async; track entry.id) {\r\n \u003cp>{{ entry.title }}\u003c/p>\r\n} @loading (minimum 200ms) {\r\n \u003cp>Loading\u003c/p>\r\n} @empty {\r\n \u003cp>No entries\u003c/p>\r\n}\r\n```\n\n### Alternatives considered\n\nI tried using the `@defer` block, but that didn't work as intended:\r\n```js\r\n@defer {\r\n @for (entry of entries | async; track entry.id) {\r\n \u003cp>{{ entry.title }}\u003c/p>\r\n } @empty {\r\n \u003cp>No entries\u003c/p>\r\n }\r\n} @placeholder (minimum 200ms) {\r\n \u003cp>Loading\u003c/p>\r\n}\r\n```","author":{"url":"https://github.com/xXNickznXx","@type":"Person","name":"xXNickznXx"},"datePublished":"2023-11-27T07:51:41Z","url":"https://github.com/angular/angular/issues/53185"}
| 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:a1ba9447-b88e-b4c4-53b3-8e95a77379a3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE82:26ECEB:38480EA:478F26F:6B01DEFB |
| html-safe-nonce | b477b0a0391c779c96d51be529f1c7f5a705f85991b18075e6df8fdb419e8e5b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTgyOjI2RUNFQjozODQ4MEVBOjQ3OEYyNkY6NkIwMURFRkIiLCJ2aXNpdG9yX2lkIjoiMjU2NjMyMTUzNzU4MTk2NTA1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2e66e0b1c806128bf761cedd9534b46e64da88706e3ae4bfcb4ef97f5109fd48 |
| hovercard-subject-tag | issue:2011696366 |
| 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/53185/issue_layout |
| twitter:image | https://opengraph.githubassets.com/75647d159c4f76e25dc4417485902c31382367c61744040aaae76083f38a598c/angular/angular/issues/53185 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/75647d159c4f76e25dc4417485902c31382367c61744040aaae76083f38a598c/angular/angular/issues/53185 |
| og:image:alt | Which @angular/* package(s) are relevant/related to the feature request? core Description It would be a great addition if the @for block would support the @loading block with the same functionality... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | xXNickznXx |
| 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