I have this template where I am displaying data in tables:
<tr ng-repeat="obj in tsc.tabEntries" ng-class-odd="'odd'" ng-class-even="'even'">
<td ng-repeat="field in tsc.entryFields">{{ obj[field]}}</td>
</tr>
I want to check that obj[field]
is an object. If it is, I want to display the name
property of that object, otherwise the value of obj[field]
.
How can I do that in template?