When the API I am dealing with has no items in the array, it returns:
items: []
If there are elements in the array, it looks something like this:
items: [
{
name: 'Bla'
}
]
I suspect that in my template, I will need to utilize ng-if to display or hide an element based on whether there is any data present.
<p ng-if="post.capabilities.items"><strong>Topics</strong>: <span ng-repeat="topic in post.capabilities.items">{{topic.name}}</p>
However, since this is my first time working with Angular, I may not be entirely accurate, and there might be a more efficient way to achieve what I have in mind.