'mat-select binding with two columns

I've a list of products and I'm trying to bind two bind with two columns.

HTML:

<mat-form-field appearance="outline">
  <mat-label>Product</mat-label>
  <mat-select formControlName="pid">
    <mat-option value="">-all-</mat-option>
    <mat-option *ngFor="let row of ds.listProduct" [value]="row.code"> 
     {{row.name}}
    </mat-option>
  </mat-select>
</mat-form-field> 

The below code it is working, but I want to bind one column more, like this:

[value]="row.code" && myCategory="row.category"

myCategory is a variable in my TS.

Is it possible and how can I get it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source