Basically I have a grid in Ionic that populates its rows using ngFor
, and creates an ionic button that should let a user "View details" for an individual object. Think of it like a list of objects that shows a "preview" of their fields, but clicking the button should load a new component that contains all of the data for the object (All my objects are stored in the array bulls
:
<ion-row [ngClass]="(i % 2 == 0) ? 'odd' : 'even'" style="border-radius: 20px; border-style: solid; border-color: grey; margin-top: 10px;" *ngFor="let bull of bulls; let i = index;" id="{{ 'bull' + i }}" >
//More ion columns
<ion-col><ion-button (click)="loadIndividualBull(i)" expand="block" color="primary" class="ion-text-wrap">View</ion-button></ion-col>
And inside this row is a few columns with some of the object's data with the "View" button at the end
When I click the View button, how can I pass the data for that one particular object into the template I have created that will display all of the object's data?
Edit: I think this post is what I'm trying to essentially do