我使用“ngx-datatable”构建行和列。对于其中一个行项目,我需要使用管道来大写该项目。我知道如何在.js中做到这一点。但出于某种原因,我必须在html中执行此操作。我不知道如何在HTML中做到这一点。任何人都可以帮忙吗?在html-Angular2中使用管道的manupulate标题
在此先感谢..
private getRows() {
this.rows = [];
for (const item of this.list) {
const rowObject: any = {
date: item.date,
method:item.method, status:item.status),
detail: item.paymentId
};
this.rows.push(rowObject);
}
}
<ngx-datatable
[rows]="rows"
[columns]="columns"
*ngIf="rows.length">
</ngx-datatable>
如果你不想在'js'中做另一个选择是'css':'text-transform:capitalize;'。 – Erevald
不完全“大写”。我必须在行项目 –
之一使用管道。您可以在[此处]提到的行模板中传递管道(https://swimlane.gitbooks.io/ngx-datatable/content/api/detail/inputs。 html) – Erevald