@marciusbezerra wrote:
I would like to know what happened with the binding of Angular that I thought was the most important, in the code below, if I modify the array item, there is no more bind and if I put
emails[i]
what I already think kinda ugly, the input loses focus with each digit. Thanks!app.component.html
<div> <ul> <li *ngFor="let email of emails; let i = index; trackBy:trackByfn"> <input [(ngModel)]="email"> </li> </ul> <span>{{ emails | json }}</span> </div>
app.component.ts
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent { emails: string[] = ['test@mail.com']; }
Posts: 1
Participants: 1