CSS
<!-- Custom CSS Styling for Dropdown -->
<div class="row no-overflow">
<div class="col-md-1 window-pad-height no-overflow">
<mat-label> Dropdown Style: </mat-label>
</div>
<div class="col-md-2 no-overflow">
<mat-form-field class="no-overflow">
<mat-select placeholder="select" [(ngModel)]="selectedStyle">
<mat-option *ngFor="" [value]="option">
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<!-- Responsive Design Styling -->
<div class="row no-overflow">
<div class="col-md-1 no-overflow">
<mat-label> Responsive Design: </mat-label>
</div>
<div class="col-md-2 no-overflow">
<mat-form-field class="no-overflow">
<mat-select placeholder="select" [(ngModel)]="selectedResponsive">
<mat-option *ngFor="" [value]="option">
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<!-- Browser Support Styling -->
<div class="row no-overflow">
<div class="col-md-1 no-overflow">
<mat-label> Browser Compatibility: </mat-label>
</div>
<div class="col-md-2 no-overflow">
<mat-form-field class="no-overflow">
<mat-select placeholder="select" [(ngModel)]="selectedBrowser">
<mat-option *ngFor="" [value]="browser">
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
JavaScript
DropdownOptions: any=
{
"dropdownStyle": [{
"styleName": "Minimalistic",
"responsiveDesign": [ {
"designType": "adaptive",
"browserSupport": [ {
"browserType": "Chrome",
"version": [
"95",
"96",
"97"
]
}, {
"browserType": "Firefox",
"version": [
"92",
"93",
"94"
]
}
]
}
]
}
]
}
styleName to be displayed in dropdown for style selection
designType to be displayed in dropdown for design type selection
browserType to be displayed in dropdown for browser selection
Selecting a style should change the available options in the design type dropdown, and selecting a design type should update the browser options accordingly. This data is retrieved from an API source.
View my example on StackBlitz here: https://stackblitz.com/edit/angular-cztf8k
Thank you for your help!