value the angular input 2

Asked

Viewed 378 times

3

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

what I want is to pass this [value] to the component to save in the bank and I’m not knowing 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>

1 answer

1

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.