<div class="form-group col-md-6" >
<label for="category_name">Category Name</label>
<input
formControlName="category_name"
class="form-control"
id="category_name"
placeholder="Enter Item Name"
[(ngModel)]="category.category_name">
<!-- <div *ngIf="itemCategory.touched && itemCategory.invalid"class="alert alert-danger">
<div *ngIf="itemCategory.errors.required">Category Name is required</div>
</div> -->{{ category.item_grp_id.group_name}}
</div>
<div class="form-group col-md-6">
<label for="item_grp_id">Group Name</label>
<select
formControlName="item_grp_id"
class="form-control select2"
id="item_grp_id"
style="width: 100%;"
(keydown) = "getAllGroups()"
(ngModelChange)="getAllGroups()"
[(ngModel)]="category">
<!-- <option value="" disabled></option> -->
<option>
{{ category.item_grp_id.group_name}}
</option>
{{ itemgroup.group_name }}
</option>
</select>