I have the following program which is working fine , the issue is when i introduce ng-repeat tag. The results are not getting printed ...
I'm sorry to be verbose but wanted to provide all details to see if iam missing something overhere.
Code
Elasticsearch + Angular ExampleAngular + Elasticsearch
<!-- if there is an error, display its message -->
<div ng-if="error" class="alert alert-danger" role="alert">{{error.message}}</div>
<!-- if clusterState is available, display it as formatted json -->
<div ng-if="clusterState" class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Cluster State</h3>
</div>
<div class="panel-body">
<pre>{{clusterState | json}}</pre>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<span class="span3">
<input class="input-block-level" ng-model="queryTerm" type="text">
</span>
<button ng-click="search()" class="btn" type="button">Search</button>
</div>
<div ng-if="results" class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Results</h3>
</div>
<table>
<thead>
<tr>
<th>Name</th>
<th>Marks</th>
</tr>
</thead>
<tbody>
<!---- This is not working -->
<tr ng-repeat = "subject in results._source.entityAttributes">
<td>{{ subject.legacyEntityAttributeName }}</td>
<td>{{ subject.legacydataType }}</td>
</tr>
</tbody>
</table>
<div class="panel-body">
<!-- This prints the Jason beautifully see output-->
<pre>{{results | json}}</pre>
</div>
</div>
</div>
output
Results
NameMarks [
{
"_index": "legacytables",
"_type": "existingtables",
"_id": "AVNC54hNO04QfeJDGYBX",
"_score": 3.9704144,
"_source": {
"dbEntityName": "TAAGENT_REMARK",
"otherEntityName": [
"pc_account",
"pc_note",
""
],
"entityAttributes": [
{
"legacyEntityAttributeName": "HOUSEHOLD_NUM",
"legacydataType": "CHAR",
"legacydatalength": "10.0",
"legacydataDefinition": "A unique system generated number which is used to identify a specific household.",
"legacydataClassification": "",
"dataTeamReviewComments": "",
"functionalTeamReviewComments": "",
"xmlTag": "",
"mappingLastUpdatedDate": "",
"mappingLastUpdatedBy": "",
"gwentityAttributeName": "AccountNumber",
"gwtableName": "pc_account",
"gwdataType": "Varchar(255)",
"gwdatalength": "Varchar(255)",
"mappedBy": "",
"mappedDate": "",
"team": "",
"gwdataDefinition": "The account number of this account. ",
"gwdataClassification": ""
},////Ignoring others for brevity
]
}
}
]