This is the code to create dropdown in Angular 7, 8, 9
.html
file code
<div>
<label>Summary: </label>
<select (change)="SelectItem($event.target.value)" class="select">
<option value="0">--All--</option>
<option *ngFor="let item of items" value="{{item.Id.Value}}">
{{item.Name}}
</option>
</select>
</div>
.ts
file code
SelectItem(filterVal: any)
{
var id=filterVal;
//code
}
items
is an array which should be initialized in .ts
file.