Considering this:
items = [
{ val: 'bleh1', subval: { attr1: 1, attr2: 2 } },
{ val: 'bleh2', subval: { attr1: 3, attr2: 4 } },
]
How can I print the attributes like 'item.subval.attr1' like this:
<div ng-repeat="item in items">
<div>{{item.val}}</div>
<div>{{item.subval.attr1}}</div>
<div>{{item.subval.attr2}}</div>
</div>
The subval attributes don't print, instead I get this:
bleh1
{{item.subval.attr1}}
{{item.subval.attr2}}
bleh2
{{item.subval.attr1}}
{{item.subval.attr2}}
Thanks!