I've got a basic Angular Material input field like this:
<mat-form-field appearance="outline">
<input matInput type="text">
<button matSuffix mat-icon-button>
<mat-icon>add</mat-icon>
</button>
</mat-form-field>
And want to change the color of the outline. For a fix color I found this example:
:host ::ng-deep {
.mat-form-field-appearance-outline .mat-form-field-outline {
color: red;
}
}
Is there a way to use the value of a variable (in a ngFor loop) as the color of the outline?