Title: Angular 17 @empty block not working in nested propagated component · Issue #53570 · angular/angular · GitHub
Open Graph Title: Angular 17 @empty block not working in nested propagated component · Issue #53570 · angular/angular
X Title: Angular 17 @empty block not working in nested propagated component · Issue #53570 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When I try to display some HTML within an @empty block is not rendering anything whereas if I am using a @if approach is working fine. Bello...
Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When I try to display some HTML within an @empty block is not rendering anything whereas if I am usi...
X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When I try to display some HTML within an @empty block is not rendering anything whereas if I am usi...
Opengraph URL: https://github.com/angular/angular/issues/53570
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Angular 17 @empty block not working in nested propagated component","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\ncore\r\n\r\n### Is this a regression?\r\n\r\nNo\r\n\r\n### Description\r\n\r\nWhen I try to display some HTML within an @empty block is not rendering anything whereas if I am using a @if approach is working fine.\r\n\r\nBellow snippet belongs to a nested HTML propagated using Angular projections (the _main_ attribute is a projection area)\r\n```HTML\r\n\t\u003cplc-box main *ngrxLet=\"games$ as games\">\r\n\t\t@for (game of games; track game._id) {\r\n\t\t\u003cplc-game-row main [game]=\"game\">\u003c/plc-game-row>\r\n\t\t} @empty { \u003c!-- \u003c=== This line FAILS-->\r\n\t\t\u003c!-- } @if(games.length === 0) { --> \u003c!-- \u003c=== This line WORKS-->\r\n\t\t\u003cng-container main>\r\n\t\t\t\u003cplc-icon [name]=\"'landscape'\" >\u003c/plc-icon>\r\n\t\t\t\u003cplc-label class=\"plc-search-game__no-record-label\">\r\n\t\t\t\t{{ 'pages.search-game.no-results' | translate }}\r\n\t\t\t\u003c/plc-label>\r\n\t\t\u003c/ng-container>\r\n\t\t}\r\n\t\u003c/plc-box>\r\n```\r\n\r\nSame code outside of a propagation based component works fine (e.g. inside a regular `\u003cdiv>\u003c/div>`)\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\n[_Minimal reproduction in StackBlitz_](https://stackblitz.com/edit/stackblitz-starters-wi1jft?file=src%2Fmain.ts)\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```true\r\nI see a blank spot where a HTML should be displayed instead\r\n```\r\n\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n```true\r\nAngular CLI: 17.0.7\r\nNode: 18.18.2\r\nPackage Manager: npm 9.8.1\r\nOS: win32 x64\r\n\r\nAngular: 17.0.7\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1700.7\r\n@angular-devkit/build-angular 17.0.7\r\n@angular-devkit/core 17.0.7\r\n@angular-devkit/schematics 17.0.7\r\n@angular/cdk 16.0.1\r\n@angular/material 16.0.1\r\n@schematics/angular 17.0.7\r\nng-packagr 17.0.2\r\nrxjs 7.8.1\r\ntypescript 5.2.2\r\nzone.js 0.14.2\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\n_No response_","author":{"url":"https://github.com/WarGreyGon","@type":"Person","name":"WarGreyGon"},"datePublished":"2023-12-14T12:55:37Z","url":"https://github.com/angular/angular/issues/53570"}
| 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:a782348d-e163-3cce-aa31-32d3ac11dec3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B4CA:16EED3:118591E:165144C:6B011BED |
| html-safe-nonce | c7791e985d93c93747b9003322260cd58988ab644c09a3681b95c2ca8f7c8117 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNENBOjE2RUVEMzoxMTg1OTFFOjE2NTE0NEM6NkIwMTFCRUQiLCJ2aXNpdG9yX2lkIjoiOTEzMDU2NTU0MzUwNDQ1MjU4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c744ed266c9384e70402b6df023c037c2a909de2752560ca08211b34116954eb |
| hovercard-subject-tag | issue:2041644868 |
| 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/53570/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fd942fb79870dd7de311a18d17cc11b32e04644f6d92cff660f36759e780035a/angular/angular/issues/53570 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fd942fb79870dd7de311a18d17cc11b32e04644f6d92cff660f36759e780035a/angular/angular/issues/53570 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description When I try to display some HTML within an @empty block is not rendering anything whereas if I am usi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | WarGreyGon |
| 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