i'm trying to iterate comments inside a nested json object with angular ng-repeat directive, but in somehow it seems not accessing to it, what i am doing wrong?
Here the json
posts: [
{
title: 'Free pizza at club meetings',
upvotes: 15,
comments: [
{commento:'comment1'},
{commento:'comment2'}
]
},
{
title: 'End all club emails with Laffy Taffy jokes',
upvotes: 9,
comments: [],
}
];
and here the view
<div class="col-lg-12 col-xs-12 comment" ng-repeat="post in posts | orderBy:'-upvotes'">
<p>{{post.title}}</p>
<p>
<span class="glyphicon glyphicon-plus-sign" ng-click="upVote(post)" style="cursor:pointer;"></span> Upvotes: {{post.upvotes}}
</p>
<p ng-repeat comment in post.comments>
{{comment.commento}}
</p>
</div>
the in the view give me error
ng-repeat="comment in post.comments"