In AngularJS, when I wanted to display an specific element from an array, within my view, I would simply reference it like this:
<span>{{contact.emails[0].email_address}}</span>
But for some reason, with the same setup in Angular, I get the error:
Runtime Error
Cannot read property 'email_address' of undefined
So if I return an object of contact that contains an emails array, how do I reference the first item on the array?
?operator, may be for the first time the template is rendered, the array is stillundefined. Like,{{ contact?.emails[0]?.email_address }}