Here is a copy of my component html

<div>{{dates[0].activity_name}}</div>
<table class='table table-condensed'>
    <tr>
        <th class = 'text-left'>Activity Name</th>
        <th class = 'text-left'>Date</th>
        <th class = 'text-left'>Days Between</th>
    </tr>
    <tr *ngFor="let date of dates">
        <td class = 'text-left' >{{date.activity_name}}</td>
        <td class = 'text-left' >{{date.date}}</td>
        <td class = 'text-left' >{{date.interval}}</td>
    </tr>
</table>

If I remove the first (div) line, the code works correctly and displays the 
individual object properties in the html. All have the same 
"activity_name". So I want to just display the activity_name from the first 
object and the remove the "  <td class = 'text-left' 
>{{date.activity_name}}</td>"
line. If I add the first line with the div, I get a "Type error: Cannot 
read property "activity_name"" of undefined. So how do I get the 
"activity_name" property of the first object for display once on the page?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to