I get some 15 different lookup list values in the component.ts
and i assign each to a list and bind it to the <select>
in html. This works fine.
To make this code more in a cleaner way, is there anything like this?
<mat-form-field class="example-full-width">
<mat-label>Preferred Job</mat-label>
<mat-select>
<mat-option *ngFor="let job of designationList.filter(x=>x.lookupName === 'Designation')" [value]="job.id">
{{job.lookupValue}}
</mat-option>
</mat-select>
</mat-form-field>
Kind of where
or filter
condition could directly be applied in the <select>
so that i can no longer use separate list for each dropdown?