<p-dropdown inputId="projectStatus" class="p-mr-0" [options]="projectStatus" placeholder="Project Status"
optionLabel="label" (ngModelChange)="onSelectType($event)" [(ngModel)]="selectedStatus">
<ng-template let-option pTemplate="item">
<span [class]="'customer-badge status-' + option.value">{{option.label}}</span>
</ng-template>
API响应
{名称:"xyz",描述:"",标签:"abc",类型:"xyz",is_active: true,…}
发布于 2020-10-21 13:42:54
在ts文件中,使绑定到选项([options]="projectStatus"
)的projectStatus
等于来自api响应的列表
https://stackoverflow.com/questions/64442138
复制相似问题