2
this.procFilterResults: any[];
this.procservices.GetProcData(this.selectedServer, this.selectedProjectName,
this.selectedProc, this.procInput,_inputs)
.subscribe(res => {
this.procFilterResults = JSON.parse(res);
this.Keys=Object.keys(this.procFilterResults[0]);
console.log(this.procFilterResults);
},
error => this.errorMessage = <any>error);
<table class="table table-bordered">
<thead>
<th *ngFor="let key of Keys">
{{key}}
</th>
</thead>
<tbody>
<tr *ngFor= 'let res of procFilterResults'>
</tr>
</tbody>
</table>
基于我的输入,我得到每个请求的新对象。我想将结果绑定到表格。 有没有什么方法可以将绑定到HTML表的对象反序列化。使用Angular2将动态对象绑定到Html
这样做后我得到了不同的错误... – Venu
你得到什么错误? –
未处理的承诺拒绝:模板分析错误: 由于它不是'td'的已知属性,因此无法绑定到'ngForIn'。 ( “
相关问题