angularangular-ngmodelangular-servicesangular-ng

Display Object name from Array of Array in Angular


I'm confused on how would i display the categories.name in array of object. I want to display in the first td.

enter image description here

<tr *ngFor="let innerItem of project.project_services">
    HERE--> <td>{{ innerItem.categories.[name]}</td>
    <td>{{innerItem.service.sku}}</td>
    <td>{{innerItem.service.name}}</td>
</tr>

Solution

  • <tr *ngFor="let innerItem of project.project_services">
        <td *ngFor="let categoryItem of innerItem.categories">{{categoryItem.name}</td>
        <td>{{innerItem.service.sku}}</td>
        <td>{{innerItem.service.name}}</td>
    </tr>