Reputation: 8636
Hi all I am returning a dictionary with a key and list of objects from my controller, I would like to bind this to the table or some other using ng-repeat
, this is how it looks when returning data from controller
This is my trail
<tr ng-repeat="(key, value) in dic">
<td>{{value}}</td>
Which is displaying entire value
Upvotes: 0
Views: 809
Reputation: 8636
This is how finally I got it
<div ng-repeat="(key, value) in dic">
{{key}}
</div>
<div ng-repeat="v in value">
{{v.requiredcolumn}}
</div>
Upvotes: 1
Reputation: 26
ng-repeat provides a mechanism for accessing the key and value of an object within the iterator. For an example of this, see the answer to this post: How can I iterate over the keys, value in ng-repeat in angular
Upvotes: 0