I have used below code to iterate over array and append values in drop down options.
searchcomponent.html:-
<div fxFlex.xs="100" class="ddlplatform" *ngFor="let dropdown of dropdownitems">
<select class="ddloption">
<option>{{dropdown}}</option>
<option *ngFor="let item of dropdown">{{item}}</option>
</select>
</div>
searchcomponent.ts:-
OnOptionChange(evt) {
this.dropdownitems = ['Platform', 'Category'];
this.Platform = ['Online', 'Offline'];
this.Category = ['2W', '3W', '4W'];
}
There are two drop down lists available i.e., Platform and Category. In Platform drop down list I want to bind Online and Offline options. How to bind the options dynamically in the drop down list?