Hi!

I'm trying to iterate over an array inside an object that is formed like 
this:

[image: Screen Shot 2018-11-16 at 4.18.24 PM.png]

I'm receiving this object by calling an API using this:

this.someService.getStuffOnView(this.idClient, 'Auto')
        .subscribe(
          data => {
           this.stuffOnView = data;
          ...

And in the template I use:

 <div class="task-group" *ngFor="let key of objectKeys(stuffOnView)">
    <div>
         <span class="column-title">
              {{ stuffOnView[key].length }} Items
         </span>
    </div>

That works fine, but when I try to get the properties inside 'recsAuto' I'm 
getting error using this:

 <div class="task-row-wrapper" *ngFor="let task of 
objectKeys(stuffOnView[key]); let i = index">
      {{ recsOnTaskManager[task].description }}

The error says: ERROR TypeError: Cannot read property 'description' of 
undefined

Thanks for your help!
          
              
         

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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