错误:找不到'对象'类型的不同支持对象'[object Object]'

时间:2017-08-09 11:38:35

标签: angular

当我尝试绑定数据时,我收到此错误:

  

错误:无法找到'object'类型的不同支持对象'[object Object]'。

这是我的代码:

 <div *ngFor="let edu of employee.education_qualification">
    <div class="row">
      <div class="form-group col-md-6">
      <label for="education_detail">Education Detail</label>
      <input type="text" class="form-control" 
      [(ngModel)]="edu.education_detail" [ngModelOptions]="
      {standalone: 
      true}">
    </div>
 </div>

pic of database

1 个答案:

答案 0 :(得分:0)

export class AppComponent{
employee: []

get(){
this.employee= yourCollection //data you are receiving 
  }
}

现在在你的HTML中使用它

<div *ngFor="let edu of employee">
{{edu.education_qualification}}