Title: Content projection with `select` can be confusing · Issue #37328 · angular/angular · GitHub
Open Graph Title: Content projection with `select` can be confusing · Issue #37328 · angular/angular
X Title: Content projection with `select` can be confusing · Issue #37328 · angular/angular
Description: Description Content projection with the select attribute can be confusing for users. select only works on root-level elements, but sometimes users will wrap an element in
Open Graph Description: Description Content projection with the select attribute can be confusing for users. select only works on root-level elements, but sometimes users will wrap an element in
X Description: Description Content projection with the select attribute can be confusing for users. select only works on root-level elements, but sometimes users will wrap an element in <ng-container *ngIf=&qu...
Opengraph URL: https://github.com/angular/angular/issues/37328
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Content projection with `select` can be confusing","articleBody":"### Description\r\n\r\nContent projection with the `select` attribute can be confusing for users. `select` only works on root-level elements, but sometimes users will wrap an element in `\u003cng-container *ngIf=\"...\">`, not realizing that the `ng-container` is unnecessary. In their mind this is just some control flow logic but the root-level element is still the thing inside the `\u003cng-container>`. However, Angular actually considers `\u003cng-container>` to be the root element and projects the element into an unexpected slot. We see this come up in issues on the Angular Components repo sometimes, since we have several components that project content into different slots.\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nhttps://stackblitz.com/edit/angular-ivy-grarvn?file=src%2Fapp%2Fapp.module.ts\r\n\r\n","author":{"url":"https://github.com/mmalerba","@type":"Person","name":"mmalerba"},"datePublished":"2020-05-28T16:05:53Z","url":"https://github.com/angular/angular/issues/37328"}
| 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:a7f0d93c-f690-fc3d-d776-0b88d4486f7a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CDC0:34CAB:149A96D:1A52845:6B013151 |
| html-safe-nonce | 124f36e2bbf44ea6656c22907b7e76d4fd29b21c76dbae989284144bc1ddb5bf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREMwOjM0Q0FCOjE0OUE5NkQ6MUE1Mjg0NTo2QjAxMzE1MSIsInZpc2l0b3JfaWQiOiI2NzgyMzgzNTM2OTYwNzc4NTc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ca7f7ad9db2a396a71ccd08134149511ee979d785a24c8771c7dba1a57f46037 |
| hovercard-subject-tag | issue:626630483 |
| 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/37328/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7d9a2165dd9c09e37f8ca9c21b4ef39ac041992099c45acfe2b10496a96c9535/angular/angular/issues/37328 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7d9a2165dd9c09e37f8ca9c21b4ef39ac041992099c45acfe2b10496a96c9535/angular/angular/issues/37328 |
| og:image:alt | Description Content projection with the select attribute can be confusing for users. select only works on root-level elements, but sometimes users will wrap an element in |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mmalerba |
| 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 | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width