Give button a value when click on it


#1

Hi all,
I have a list which is build up from firebase. At every result I put a button. What I want is that when I click the button the name of that item in the list have to put in a sort of todo list. At the moment when I click there is an item inserted in the todo list but is an empty rule.

I think that the buttons are not connected to the items I pull out of firebase.

What is the best thing to archieve this?

<ion-list *ngFor="let product of products | async">
  <ion-item value="product.name">
    {{product.name}} <button type="button" ion-button color="secondary" value="todo" (click)="onSubmit()" name="todo" id="todo"> --></button>
  </ion-item>
</ion-list>