I have my own object with data which I loop through using ngFor. However there is an array part in the object, which I want to loop through as well in a <li></li>
Currently it looks like this. However I don't want the complete string in one <li></li> I just want one piece of the array there.

Relevant Code:
tier.model
export class Tier {
constructor (
public id: number,
public title: string,
public rewards: any[],
public price: number
)
{}
}
component:
export class PackagesComponent { //will be renamed to TierComponent
public tierToEdit: Tier;
editMode = false;
tiers: Tier[] = [
new Tier(
10,
'First Tier',
['Server access - Simple', 'Win something small', 'and so on'],
5.00),
new Tier(
11,
'Second Tier',
['Server access - Standard', 'Win something medium', 'and so on and on'],
10.00),
new Tier(
12,
'Third Tier',
['Server access - Advanced', 'Win something big', 'and so on and on and on'],
10.00)
]
template:
<div class="row">
<div class="col-md-4" *ngFor="let tier of tiers; let i=index;">
<ul class="pricing-table">
<li class="plan-name">
{{ tier.title }}
</li>
<li *ngFor="let reward of tiers">
{{ reward.rewards }}
</li>
<p class="plan-price">{{ tier.price }}</p>
<li class="plan-action">
<a class="btn btn-primary" (click)="onEdit(tier)">Edit</a>
<a class="btn btn-success" (click)="this.clickSave()">SaveYes</a>
<a class="btn btn-warning" >Get</a>
</li>
</ul>
In the end it should look like this:
Something else I tried was this:
<div class="col-md-4" *ngFor="let tier of tiers; let i=index;">
<!-- Show Mode -->
<ul *ngIf="!editMode || tierToEdit != tier" class="pricing-table">
<li class="plan-name">
{{ tier.title }}
</li>
<li *ngFor="let reward of tiers; let i=index">
{{ reward.rewards[i] }}
</li>
Which than gave me the first element of the first array, the second element of the second array and the third element of the third array:
Hope this is not to confusing, still very new to angular/javascript, sorry for possibly asking stupid question or using wrong terms :) Thank you very much!
