I’m trying to send onclick id to the next page. i’m able to send only specific id to next page like using below code:
this.navCtrl.push(ChecklistPage, { checklisttNo: this.resposeData[0].project_id }); but it will send only 0th index code then how to send any id that i clicked
<div *ngFor="let project of resposeData"> // iterating through each responseData
<ion-item (click)="onSelectID(project.project_id)">{{project.name}}</ion-item>//Just displaying name(you can replace with your own logic ), onclick of name sending project ID to the ts file.
</div>
In TS
onSelectID(id:number){
this.navCtrl.push(ChecklistPage, { checklisttNo: id })
}