I am working on a page with several input boxes that need to be flagged for certain criteria.
<div class="form-group">
<label class="d-block">Allowance Type</label>
<div class="input-group">
<input type="text" class="form-control width-150" [(ngModel)]="selectedPricingItem.allowanceTypeDescription" readonly>
<span class="input-group-addon mg-batch-flag" (click)="flagItem('allowanceTypeDescription','Allowance Type')" data-toggle="modal" data-target="#auditDialog">
<i class="fa fa-fw fa-flag" aria-hidden="true">
</i>
</span>
</div>
</div>
This structure repeats multiple times on the page, and I want to apply a Bootstrap class (has-danger) based on a click event handler. In the event handler, I populate an instance of a class intended for submission to a web service. Would it be best to create a component with different styles and use *ngIf to hide/show?