I´m trying to display a list of posts with a comment section that is unique to that post. Instead of displaying specific comments under specific posts, all the comments are displayed on every single post.
I have got 2 models:
Answer from back of get list of posts:
My backnode get all posts:
My service in Angular:
My component:
And here the HTML. I have tried with *ngFor, and ng-repeat and different ways. I am sort of new in Angular, any help will be appreciated.
Answer from back from get all posts:
CodePudding user response:
you have to make the comments array of the post inside its post object