Title: Feature: Hostless components · Issue #18877 · angular/angular · GitHub
Open Graph Title: Feature: Hostless components · Issue #18877 · angular/angular
X Title: Feature: Hostless components · Issue #18877 · angular/angular
Description: I'm submitting a... [ ] Regression [ ] Bug report [X] Feature request [ ] Documentation issue or request [ ] Support request Current behavior Component-containers like
Open Graph Description: I'm submitting a... [ ] Regression [ ] Bug report [X] Feature request [ ] Documentation issue or request [ ] Support request Current behavior Component-containers like
X Description: I'm submitting a... [ ] Regression [ ] Bug report [X] Feature request [ ] Documentation issue or request [ ] Support request Current behavior Component-containers like <app-root>, <app...
Opengraph URL: https://github.com/angular/angular/issues/18877
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature: Hostless components","articleBody":"## I'm submitting a...\r\n\u003cpre>\u003ccode>\r\n[ ] Regression\r\n[ ] Bug report\r\n[X] Feature request\r\n[ ] Documentation issue or request\r\n[ ] Support request\r\n\u003c/code>\u003c/pre>\r\n\r\n## Current behavior\r\nComponent-containers like `\u003capp-root>`, `\u003capp-hero-list>`, etc. do break flex layout.\r\n\r\n\r\n## Expected behavior\r\nA component(or whole module) should have the option to create no html-element. Instead Angular should work with comments instead of html-elements, exactly like `ng-container`.\r\n\r\n\r\n## Minimal reproduction of the problem with instructions\r\n```\r\n\u003chtml style=\"width: 100%; height: 100%;\">\r\n \u003cbody style=\"width: 100%; height: 100%; display: flex; flex-direction: column;\">\r\n \u003capp-root>\r\n \u003cdiv style=\"flex: 1; background: lightcoral;\">I should have full height!\u003c/div>\r\n \u003c/app-root>\r\n \u003c/body>\r\n\u003c/html>\r\n```\r\n\r\nPlunker: https://plnkr.co/edit/aOWUciRx2EsRsKwL2zma?p=preview\r\n(Uncomment app-root in styles.css to see currently needed fix)\r\n\r\n## What is the motivation / use case for changing the behavior?\r\nUsing `display:flex` only affects the child-element which gets broken by any `\u003capp-component>` tag. To apply the example above with multiple nested components to require ugly, hardcoded stylesheets:\r\n\r\n```\r\n body,\r\n app-root,\r\n app-hero,\r\n app-hero-list,\r\n app-hero-detail {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n```\r\n\r\nAlso, as a frontend developer, i don't like the `\u003capp-component>` tags either :D\r\n\r\n## Environment\r\n\r\n\u003cpre>\u003ccode>\r\nAngular version: 4.x.x / 5.x.x\r\n","author":{"url":"https://github.com/MickL","@type":"Person","name":"MickL"},"datePublished":"2017-08-25T11:13:58Z","url":"https://github.com/angular/angular/issues/18877"}
| 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:2be6299d-431d-c88b-60cc-69a5c0e01284 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D97E:25598F:F613E7:145D523:6B0107F0 |
| html-safe-nonce | a8727875be94e25c58d367828a87a866575d2b12417651af0fe82789336af17b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTdFOjI1NTk4RjpGNjEzRTc6MTQ1RDUyMzo2QjAxMDdGMCIsInZpc2l0b3JfaWQiOiI3NTEzMzkzMDc4MTgzNDYyODk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 05f86ac5d2e76849484d09b41341265e555d6525ccbdf0ef5ec257cfcd005fa6 |
| hovercard-subject-tag | issue:252870075 |
| 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/18877/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1a25a5f0d21deba172eef04e309ed30ea89f3ecf2f804892515fa86961e9c847/angular/angular/issues/18877 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1a25a5f0d21deba172eef04e309ed30ea89f3ecf2f804892515fa86961e9c847/angular/angular/issues/18877 |
| og:image:alt | I'm submitting a... [ ] Regression [ ] Bug report [X] Feature request [ ] Documentation issue or request [ ] Support request Current behavior Component-containers like |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MickL |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width