Title: Suggested workaround for content-projection in control flow blocks does not work · Issue #59398 · angular/angular · GitHub
Open Graph Title: Suggested workaround for content-projection in control flow blocks does not work · Issue #59398 · angular/angular
X Title: Suggested workaround for content-projection in control flow blocks does not work · Issue #59398 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? compiler-cli, compiler Is this a regression? No Description When having multiple root elements in a control flow block, the compiler gives a friendly message suggesting to Split the ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? compiler-cli, compiler Is this a regression? No Description When having multiple root elements in a control flow block, the compiler gives a f...
X Description: Which @angular/* package(s) are the source of the bug? compiler-cli, compiler Is this a regression? No Description When having multiple root elements in a control flow block, the compiler gives a f...
Opengraph URL: https://github.com/angular/angular/issues/59398
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Suggested workaround for content-projection in control flow blocks does not work","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncompiler-cli, compiler\n\n### Is this a regression?\n\nNo\n\n### Description\n\nWhen having multiple root elements in a control flow block, the compiler gives a [friendly message](https://github.com/angular/angular/blob/b22677d761fd7af38ac27c7162837cdd9b93a750/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts#L579) suggesting to\n\u003e Split the content of the @case block across multiple @case blocks such that each one only has a single projectable node at its root.\n\nThis does however not seem to work as suggested (or it works but the message is unclear). In particular, this does not seem to work for `ng-content` with specific selector targets.\n\nSee example of reproducing [here](https://stackblitz.com/edit/stackblitz-starters-avyqjise?file=src%2Fmain.ts)\n\n\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://stackblitz.com/edit/stackblitz-starters-avyqjise?file=src%2Fmain.ts\n\n### Please provide the exception or error you saw\n\nNo exception.\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 18.0.0\nNode: 20.14.0\nPackage Manager: yarn 3.4.1\nOS: win32 x64\n\nAngular: 18.2.1\n... animations, cdk, common, compiler, compiler-cli, core, forms\n... language-service, material, material-moment-adapter\n... platform-browser, platform-browser-dynamic, router\n\nPackage Version\n---------------------------------------------------------\n@angular-devkit/architect 0.1802.1\n@angular-devkit/build-angular 18.2.1\n@angular-devkit/core 18.2.1\n@angular-devkit/schematics 18.2.1\n@angular/cli 18.0.0\n@schematics/angular 18.2.1\nrxjs 7.8.1\ntypescript 5.5.4\nwebpack 5.91.0\nzone.js 0.14.6\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/kklocker","@type":"Person","name":"kklocker"},"datePublished":"2025-01-07T12:56:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/59398/angular/issues/59398"}
| 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:2d12c8ab-5f80-7aed-6254-8c2f92376454 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA76:1427E7:37EBA16:487DE41:6974C815 |
| html-safe-nonce | 5ef36220e3bfda97c6508f1a3cf6196385203c3cb8f7ea40d3eadfeead1eab95 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTc2OjE0MjdFNzozN0VCQTE2OjQ4N0RFNDE6Njk3NEM4MTUiLCJ2aXNpdG9yX2lkIjoiNDkxODE0MTQ2NzI5ODY3ODgwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a61bb11c0fc0c318f02355854f1a05ee3ebf17fbd6ab65fd45089330f39e4880 |
| hovercard-subject-tag | issue:2772785035 |
| 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/59398/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fd61c6be4403cc9a264a921f804d820327b3b93f43a676a1b39aa38c6502dd49/angular/angular/issues/59398 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fd61c6be4403cc9a264a921f804d820327b3b93f43a676a1b39aa38c6502dd49/angular/angular/issues/59398 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? compiler-cli, compiler Is this a regression? No Description When having multiple root elements in a control flow block, the compiler gives a f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kklocker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width