I'm currently working on a project where I am using ngRepeat for posts and another one for comments. However, I am facing an issue with retrieving the comments for each post as I need to somehow pass the post ID into the comments ngRepeat.
<div ng-app="posts" ng-controller="PostCtrl">
<div id="posts_container" ng-repeat="post in posts">
<div id="the_post">
<!-- To get the correct comments for each post, I need to pass the post.id -->
<div id="the_comments" ng-repeat="comment in comments">
</div>
</div>
</div>
</div>
While this process is straightforward with a PHP foreach loop, I am struggling to implement it in AngularJS. Additionally, I am unsure if nesting ng-repeat is good practice. Any guidance would be greatly appreciated. Thank you!