I have an array of objects like this:
[{
position: "Software Developer",
company: "Big company",
details: [
"task1","task2,"task3"
]
},
{
position: "Software Developer",
company: "Another Big company",
details: [
"task1a","task2a,"task3a"
]
}]
I read that from the service in my component:
ngOnInit() {
this.data.getExperience().subscribe(
data => this.experience$ = data
)
}
In my html I iterate over this array but inside the loop I would like to iterate over details as well. I've tried a few approaches including the below one but I don't really understand how that works here. How to approach it correctly?
<li *ngFor='let experience of experience$'>
<!--<a routerLink='/details/{{ user.id }}'>{{ user.name }}</a>-->
<ul>
<li class="position">{{ experience.position }}</li>
<!--<li><a href='http://{{ user.website }}'>{{ user.website }}</a></li>-->
<li class="company">{{ experience.company}}<span class="dates"> {{ experience.dates}}</span></li>
<ul class="details" *ngFor='let d of experience.details$'></ul>
<li>{{ d }}</li>
</ul>
</li>