1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Only use two way bind inside ngFor with index?

Discussão em 'Angular' iniciado por Joelton, Junho 11, 2025.

  1. Joelton

    Joelton Guest

    I want to bind an array of objects to inputs using *ngFor. Is it necessary to use the index property to get a stable behavior or the following code would work without causing trouble?

    <div *ngFor="let dog of dogs">
    <input [(ngModel)]="pessoa.dogs" />
    </div>


    And if it causes trouble, which one is it?

    Continue reading...

Compartilhe esta Página