I am implementing an input type search in Reactive forms. I want to change the color of a formfield or label when the value is matched with the search input value. How can i achieve this please guide me.
HTML
<form
[formGroup]="form">
<h3>Group Filter</h3>
<div class="row">
<div class="col-md-3">
<label> FirstNAme:
<input type="text"
formControlName="firstName"
class="form-control"
placeholder="First Name"
/></label>
</div>
<div class="col-md-3">
<label> LastName:
<input type="text"
formControlName="lastName"
class="form-control"
placeholder="Last Name"
/>
</label>
</div>
<div class="col-md-3">
<label> Job Title:
<input type="text"
formControlName="Job Title"
class="form-control"
placeholder="Job Title"
/>
</label>
</div>
<div class="col-md-3 col-sm-3">
<select class="form-control"
formControlName="gender">
<option value="">Gender</option>
<option value="M">male</option>
<option value="F">female</option>
</select>
</div>
<div class="col-md-3">
<label> AGE_FROM:
<input type="text"
formControlName="agefrom"
class="form-control"
placeholder="age from"
/>
</label>
</div>
<div class="col-md-3">
<input type="text"
formControlName="ageto"
class="form-control"
placeholder="age to"
/>
</div>
<div>
<input type='search' [(ngModel)]='searchTerm' [ngModelOptions]="{standalone: true}"
placeholder="search">
</div>
</div>
If i search for the value "FIRSTNAME" i want to highlight or change the color of the label with value FIRSTNAME. I want to implement for all the values. what is the better way to do it.