Is there a way to group data from *ngFor in the dropdown selection without using optGroup? You can find the JSON file link below: JSON Data
Typescript Code
getProducts() {
if (this.products.length < 1) {
this.productService.getProducts().subscribe(p => {
this.masterProductAttributeItems = p.MasterProductAttributeItems;
});
}
HTML Code
<select class="form-control input-sm">
<ng-container *ngFor="let thing of masterProductAttributeItems">
<option value="{{ thing.MasterProductAttributeItemId }}">
{{ thing.Name }}
</option>
</ng-container>
</select>