1
I have a *ngFor of an array object, I want to pass the id inside the button to typescript to configure it as links in a modal. Follow the syntax I’m trying with no success:
<ion-item *ngFor="let item of itens">
<ion-thumbnail item-left>
<img src="../assets/img/{{item.img}}">
</ion-thumbnail>
<h2>{{item.nome}}</h2>
<p>{{item.categ}}</p>
<button id="{{item.id}}" ion-button clear item-right (click)="chamaProd()">ver</button>
</ion-item>
and component controller? what code ?
– MoshMage
It would just be (click)="chamaProd(item.id)", so in your controller the function would be called Prod(id) and that id is what was passed. Have you tried this? If you want to make an example.
– André Vicente