我对自己的代码有疑问。
我有此代码:
<ListView class="list-group" [items]="shop.products" style="height:1250px">
<ng-template let-country="item" let-i="index">
<FlexboxLayout flexDirection="row" class="list-group-item">
<Label col="0" text="productID"></Label>
<Label col="1" text="price"></Label>
<Label col="2" text="quantiy"></Label>
<Label col="3" text="total"></Label>
<Label col="4" text="Other"></Label>
<Label [text]="country.productID" class="list-group-item-heading"
verticalAlignment="center"
style="width: 60%; padding: 2% 2% 2% 2%;"></Label>
<Label col="0" [text]='country.price + "L"' class="list-group-item-heading"
verticalAlignment="center"
style="width: 60%; padding: 2% 2% 2% 2%;"></Label>
<Label col="1" [text]='country.quantiy' class="list-group-item-heading"
verticalAlignment="center"
style="width: 60%; padding: 2% 2% 2% 2%;"></Label>
<Label col="2" [text]='country.quantiy * country.price + "L"'
class="list-group-item-heading" verticalAlignment="center"
style="width: 60%; padding: 2% 2% 2% 2%;"></Label>
<Label col="3" [text]='shop.productID' class="list-group-item-heading"
verticalAlignment="center"
style="width: 60%; padding: 2% 2% 2% 2%;"></Label>
<Button col="4" class="button"
(tap)="ondeleteitem()"
text='X'></Button>
</FlexboxLayout>
</ng-template>
</ListView>
我想要的是在每列中放置标题,并在此处显示所有列表。像一张桌子。 Example