でNGリピートを使用して、表内の表Iはangularjs
に新しいですし、web-development
.Iはこのように、複雑なテーブル内のデータを表現するためにNGリピートを使用しています:angularjs
A B C D
abc pqr xyz std
だから、これはコード:今すぐ
{
"type": "report",
"id": 14,
"attributes": {
"annotation": "abc",
"field": "pqr",
"message": "xyz",
"score": "7"
},
"innerAnnotations": {
{
"annotation": "jkl",
"field": "pqr",
"message": "xyz",
"score": "6"
},
{
"annotation": "Qualification",
"field": "EFG",
"message": "HIJ",
"score": "5"
}
}
},
表S:
<div class="table-responsive">
<table class="table table-striped table-bordered report-table table-fixed" contextmenu-container="meta.contextmenu" fixed-header>
<thead class="text-center text-info">
<th class="text-center">A</th>
<th class="text-center">B</th>
<th class="text-center">C</th>
<th class="text-center">D</th>
</thead>
<tr ng-repeat="report in reports.data">
<td class="text-center">{{ report.attributes.annotation }}</td>
<td class="td-report-field" contenteditable="{{enableReportEditing}}" contextmenu-item="report" context-menu="menuOptions">{{ report.attributes.field }}</td>
<td>
<input type="checkbox" ng-if="report.attributes.message && showcheckbox" ng-bind="report.attributes.message" ng-click="getcheckedData(report.attributes.message)">
<span ng-if="report.attributes.message" contentEditable ng-model="report.attributes.message">
{{ report.attributes.message }}
</span>
<span ng-if="!report.attributes.message">{{ report.attributes.message }}</span>
</td>
<td class="text-center">{{ report.attributes.score }}</td>
</tr>
</table>
</div>
そしてjson
は次のようです(abcは親になります)
A B C D
abc pqr xyz 7
jkl pqr xyz 6
Qualification EFg Hij 5
私はいくつかのことを試みましたが運はありません。いずれか1つ私はこれを解決するのを助けることができますか?どんな助けも素晴らしいでしょう。
コンソールにエラーがありますか? –
何が問題なのですか?すべてのデータが正しく印刷されています。 – Vivz
これは無効なjsonです。 'innerAnnotations'プロパティは配列オブジェクトを持つ必要があります。 –