【发布时间】:2022-10-21 22:15:01
【问题描述】:
我有一组看起来像的对象
[
{sn: 'N300W150726', merchantName: ' test', __typename: 'GetTpeByUser'}
{sn: 'N300W150726', merchantName: 'alex', __typename: 'GetTpeByUser'}
{sn: 'N300W150726', merchantName: 'alexa', __typename: 'GetTpeByUser'}
]
我想在按钮文本中显示商家名称并通过函数发送 sn
<nb-card [size]="'medium'" *ngIf="!toggle">
<nb-card-header>
<div class="col-lg-6">Point de vente</div>
</nb-card-header>
<nb-card-body>
<nb-list>
<nb-list-item *ngFor="let item of nameUsersByTpe">
<!-- FILTER ARRAY -->
<button nbButton (click)="getTpeByUser(item.sn)">
{{ item.merchantName}}
</button>
</nb-list-item>
</nb-list>
</nb-card-body>
</nb-card>
这段代码什么也没返回,有什么解决办法吗??
【问题讨论】:
标签: node.js angular typescript frontend