I have a page that will have a handful of input boxes that I want to be able to flag for
<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>
I have this structure a few times on the page and I want to be able to a bootstrap class (has-danger) to them based on a the click event handler I have. In that handler I am just populating an instance of a class that I intend on submitting to a web service at this point. Is the best approach to create a component with the different styles and use *ngIf to hide/show?