I am trying to loop through using the data below in angular ng-repeat
{
"qid": "173995X306X4091",
"gid": null,
"comments": "Milestone1: Here is the milestone1details",
"owner": "Me",
"targetdate": "28-10-2016"
},
{
"qid": "173995X306X4101",
"gid": null,
"comments": "",
"owner": "",
"targetdate": ""
}
HTML:
<div class="modal-body" ng-repeat="milestone in milestones ">
<table class="table table-striped">
<thead>
<tr>
<th>Milestone </th>
<th>Milestone Owner</th>
<th>Milestone Target date</th>
</tr>
</thead>
<tr>
<td>{{milestone.comments }} </td>
<td>{{milestone.owner }}</td>
<td>{{milestone.targetdate }}</td>
</tr>
</table>
</div>
I don't want the empty attributes to show : like the below for second object
<table class="table table-striped">
<thead>
<tr>
<th>Milestone </th>
<th>Milestone Owner</th>
<th>Milestone Target date</th>
</tr>
</thead>
<tbody><tr>
<td class="ng-binding"> </td>
<td class="ng-binding"></td>
<td class="ng-binding"></td>
</tr>
</tbody>
</table>
How can I do this? Thanks