the thing is that i want to enable or disable other inputs by enabling "Protesis" input.
Ts:
this.incidenteForm.get(FieldConstants.FIELD_GROUP_NAME_REQUERIMIENTO).get(FieldConstants.FIELD_NAME_PRESTACION).setValue(' ');
let resultado :any;
switch(value){
case 'Prótesis' :
resultado = await this.nomencladorService.getNomencladorProtesis().toPromise();
break;
case 'Medicamentos':
const dataMedicamento = await this.medicamentoService.getMedicamentosByGroup().toPromise();
resultado =dataMedicamento.items;
break;
case 'Otras Prestaciones':
const nomenclador = await this.nomencladorService.getNomencladoresByGroup().toPromise();
resultado =nomenclador[1].items;
break;
}
this.prestacionFullAutocomplete = ComponentUtils.populatePrestacionesAutocomplete(resultado,value);
}
HTML:
<mat-select
(ngModelChange)="onChangeTipoPrestacionControl($event)"
formControlName="tipoPrestacion">
<mat-option>--</mat-option>
<mat-option
id="option_{{ item.key }}"
*ngFor="let item of tipoDePrestacionOptions"
[value]="item.value"
>
{{ item.value }}
</mat-option>
</mat-select>