assign value to the angular input 2

Posted on

Question :

I have an object coming from the bank that I show in the view in a ngFor.

I want to pass this value to the save component in the database and I’m not sure how.

<form #f="ngForm">
  <div *ngFor="let item of dados">
      <ion-input type="hidden" [value]="item.nomeProduto"></ion-input>

  <button ion-button full block color="danger">CADASTRAR</button>


Answer :

try to do with [ngValue] instead of [value]


Leave a Reply

Your email address will not be published. Required fields are marked *