assign value to the angular input 2

3

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>
      <h2>{{item.nomeProduto}}</h2>

  </div>
  <button ion-button full block color="danger">CADASTRAR</button>
</form>
    
asked by anonymous 30.09.2017 / 16:19

1 answer

1

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

    
20.12.2017 / 20:54