I have a mat-select where the options are all objects defined in an array. I am trying to set the value to default to one of the options, however it is being left selected
The solution for me was:
{{moneda.detalle}}
TS:
@ViewChild('monedaSelect') public monedaSelect: MatSelect; this.genericService.getOpciones().subscribe(res => { this.monedasList = res; this.monedaSelect._onChange(res[0].id); });
Using object: {id: number, detalle: string}