I used the "select" for the dropdown. Below is the coding.
<div class="ui-grid-col-6">
<div class="form-group">
<select name="status" formControlName="purchaseOrderStatusId">
<option>Select PurchaseOrderStatus</option>
<option *ngFor="let PurchaseOrderStatus of allPurchaseOrderStatus" value="{{ PurchaseOrderStatus.id }}">
{{ PurchaseOrderStatus.code }}
</option>
</select>
</div>
</div>
Here all values from the API are saved in the variable allPurchaseOrderStatus.
And I want id as my stored value and code as the display value.
I need the same concept using the primeNg component.