-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Open
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: host and host bindingsfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under consideration
Milestone
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-hero-list>, etc. do break flex layout.
Expected behavior
A 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.
Minimal reproduction of the problem with instructions
<html style="width: 100%; height: 100%;">
<body style="width: 100%; height: 100%; display: flex; flex-direction: column;">
<app-root>
<div style="flex: 1; background: lightcoral;">I should have full height!</div>
</app-root>
</body>
</html>
Plunker: https://plnkr.co/edit/aOWUciRx2EsRsKwL2zma?p=preview
(Uncomment app-root in styles.css to see currently needed fix)
What is the motivation / use case for changing the behavior?
Using display:flex only affects the child-element which gets broken by any <app-component> tag. To apply the example above with multiple nested components to require ugly, hardcoded stylesheets:
body,
app-root,
app-hero,
app-hero-list,
app-hero-detail {
display: flex;
flex-direction: column;
}
Also, as a frontend developer, i don't like the <app-component> tags either :D
Environment
Angular version: 4.x.x / 5.x.xdaelmaak, xp44mm, littletof, ThatWasBrilliant, sinedied and 252 moremauriziocesconsergiubologa, SalathielGenese, kylecordes, klemenoslaj, MarioGruda and 9 moremauriziocesconfeafarot, SalathielGenese, klemenoslaj, MarioGruda, samclaus and 6 more
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: host and host bindingsfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under consideration