我无法让我的列表成为全高。我的代码更复杂的嵌套组件。但是我仍然可以使用这段代码来复制它。这是一个庞然大物。 http://plnkr.co/edit/R0QgLz8cjyRHYOLf4uJW设置角度组件的全高
styles.css的
html, body {
min-height: 100%;
height: auto;
margin: 0;
}
app.component.css
.container {
height: 100%;
background: black;
color: white;
list.component.css
.row {
display: flex;
flex-direction: row;
}
.list {
width: 33%;
height: 100%;
flex-direction: column;
display: flex;
border-right: groove white 1px;
border-top: groove white 1px;
}
.item {
width: auto;
height: 100%;
flex-direction: column;
display: flex;
}
list.component.html
<div class="contents">
<button (click)="updateDocuments()">Update Document</button>
<div class="row">
<div class="list">
<div *ngFor="let document of documents; let i = index;">
{{i + 1}}. {{document}}
</div>
</div>
<div class="item">
this is an item
</div>
</div>
</div>
我希望这工作。如果我的列表比查看高度长,我无法滚动。 – mkteagle
你只是溢出它? – unitario
请参阅:http://plnkr.co/edit/54mG5kYrowh0ixAM6CUb?p=preview – unitario