I have a container of objects that are stored indexed by their identity in a hash.
myObjs = {
"hello id":{
foo:"hello foo data",
bar:"hello bar data"
},
"world id":{
foo:"world foo data",
bar:"world bar data"
}
}
I would like to bind each object in myObjs to a row in a ui-grid (http://ui-grid.info/). In a generic table it would look like:
<table>
<tr ng-repeat="(id, obj) in myObjs">
<td>{{id}}</td>
<td>{{obj.foo}}</td>
<td>{{obj.bar}}</td>
</tr>
</table>
One solution is to derive a new array of objects from the contents of myObjs to use as input data to the ui-grid, but this would mean I would have to maintain the binding between myObjs and the derived array input.
Is there a more natural way to bind the ui-grid to myObjs?