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
どのようなエラーが発生していますか? –
未処理プロミス拒否:テンプレート解析エラー: 「ngForIn」にはバインドできません。「ndForIn」は「td」の既知のプロパティではないためです。 ( "
関連する問題