나는 다음을 수행하여 나는 간단한 테이블이 될 것이라고 생각 무엇을 만들려고 노력하고 있어요 : 내가 만들고 싶은 테이블의Nativescript w/NG2 : * ngFor 루프는 GridLayout과의 행을 만들 수
<GridLayout rows="auto" columns="*,*,auto" width="100%" class="table-body">
<Label col="0" row="0" text="Date"></Label>
<Label col="1" row="0" text="Previous Owner"></Label>
<Label col="2" row="0" text="Price" horizontalAlignment="center"></Label>
<template *ngFor="let sale of history; let i = index">
<Label col="0" row="{{i+1}} [text]="sale.saleDate"></Label>
<Label col="1" row="{{i+1}} [text]="sale.username"></Label>
<Label col="2" row="{{i+1}} [text]="sale.price" horizontalAlignment="center"></Label>
</template>
</GridLayout>
샘플 :
이 코드는 작동하지 않습니다하지만 나는 내가 나에게 GridLayout과 태그 내부의 *ngFor
을 넣어,이 제안되었다 할 것을 시도하고 보여줍니다 생각 만 원으로 그 작동하지 않습니다 가장 큰 걸릴 sale.price
을 눌러 열 너비를 지정합니다.
나는이 일을 돕기 위해 모든 어려움을 겪고있는 것에 놀랐다. 어떤 도움을 주시면 감사하겠습니다.