I can see the value in the FormControl. How do I highlight it ? I am assuming the FormControl has the HTML element somewhere inside it ?
onclickMatt(e, idx) {
// alert(idx);
//var test = e.target.select();;
//is value in textbox = '0'? then select all
var pricePerUnit = this.requestform.controls['LineItemsArray'].value[idx].InputPricePerUnit
if (pricePerUnit == 0) {
alert("priceperunit is 0");
//highlight it all
//this.InputPricePerUnit.
}
else {
alert("priceperunit is not 0");
}
}
<td class="fifteen">
<div class="input-group">
<input formControlName="InputPricePerUnit"
#formPricePerUnit type="text"
class="form-control" required
(blur)="calcPrice($event,i)"
(click)="onclickMatt($event,i)">
</div>
</td>