私のリストを高さにすることはできません。私のコードはネストされたコンポーネントではもっと複雑です。しかし、私はまだこのコードを使用してこれを複製することができます。ここには塊がある。 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