Hi all,
I have the following code in the html file:
<button ion-item *ngFor="let item of properties" (click)="itemSelected(item)">
{{ item.name_number }}, {{ item.street }}, {{ item.town }}, {{ item.postcode }}</button>
This basically shows a list of properties, now I want to be able to click a property and the data from the itemSelected()
be shown in a different div element.
How does one achieve this? PS a Ionic newbie here.
I do have the method setup within the ts file as follows:
itemSelected(item: any)
{
console.log(item);
}
Which does show the selected item, but like I said I want this to display on the same page within a different div
or ion-element
When I do the console.log on the item I do see this:
{id: 151, membership_number: null, status: "inactive", landlord_id: 71, agency_id: null, …}
So the data is there I’m just not sure how I get certain parts from it to show on the page.
Anyone willing to help out?