JSON response is in array but still throws an error “NgFor only supports binding to Iterables such as Arrays”
问题 TypeScript File export class CompanyComponent { apiService : APIService; data : any; private companyUrl = 'http://localhost:4000/api/company/'; constructor(apiService : APIService) { this.apiService = apiService; this.getCompanies(this.companyUrl); } getCompanies(url: any){ this.data = this.apiService.GET(url).map((response :Response)=> response.json()).subscribe((response)=>{ this.data = response; console.log(this.data); }) } Response array [ {"_id":"58f61a132d44240d085ca2fa","comapny_name":