my code like this.But when ı am running everthing is okey except opening always “fourthPage”.
İn every item opening same page which is “fourthPage”
so please help me.
<ion-list *ngFor=“let item of items”>
{{item.component}}
<ion-item *ngFor="let person of people” (click)="“openPage(item)">
{{person.lesson_d.name}}
</ion-item>
</ion-list>
people is my json array which ı want to display in the page. Item is my page array which ı want to push for each person. But every person go to same page . I want to push different pages. please help me.
Do you want to display the list of people on the home page? and then when u click on a person name, which page should it navigate to?
If you are looking to use nested ngFor loops, you need to first workout on how to loop over items and persons first. Then you could use ion-list and ion-item and do something like this
<ion-list *ngFor=“let person of people”>
{{person.lesson_d.name}}
<ion-item *ngFor="let item of items” (click)="“openPage(item)">
{{person.lesson_d.name}} {{item.component}}
</ion-item>
</ion-list>