I have created an API for getting all services, I want to put the name of services in dropdown list, I have tested this code but it doesn't work!
HTML
<div class="col-lg-6">
<select name="Service"
class="form-control">
<option>-- Select Services --</option>
<option [value]="serv.service_name" *ngFor="let serv of ServiceList">
{{ serv.service_name}}
</option>
</select>
</div>
TS
ServiceList: any;
ngOnInit(): void {
this.serviceService.getAllServices().subscribe((data: any)=>{
this.ServiceList = data;
//console.log(this.services);
})
}
getAllServices
function ofserviceService
service