1

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>
0

1 Answer 1

1
<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>
Sign up to request clarification or add additional context in comments.

3 Comments

Now I have edited the answer by adding one more *ngFor on categories
@GraySingh: Sure, and if this answer has worked for you then please approve my answer too.
It says you can accept answer in 6 minutes. Ill just wait for it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.