当时脑子抽了,当时没想到Angular的指令:*ngIf就可以实现这个操作。
<ng-template #modalFooter>
<button nz-button nzType="default" (click)="handleCancel()" *ngIf="isSucceed">确认</button>
<button nz-button nzType="primary" (click)="handleOk()" *ngIf="!isSucceed">导入</button>
</ng-template>
Angular指令*ngFor就可以实现这个目的
显示日期格式化,插入图标
<tr *ngFor="let pdf of basicTable.data"
(click)="onSelectFile(pdf)">
<td style="font-size: smaller;">
<img src="assets/img/FileInfo/pdf.svg">
{{pdf.name}}
</td>
<td style="font-size: smaller"> {{pdf.uploadDate|date:'yyyy/MM/dd-HH:mm'}}</td>
<td ><a (click)="showModal(pdf)">删除</a></td>
</tr>
button属性设置
<button nz-button nzType="primary" style="margin-right: 3px"
(click)="uploadPDF()"
[disabled] = "!isEditable"
>导入</button>