-1
I have a script registration screen and on this screen I can add n scenarios, I’m using angular, I can add the items in the list, but while typing in the input it changes the items that are already added to the list.
commponent.ts
incluirCenario() {
this.cenario.push(
{}
)
}
html
<mat-card-title>Cadastrar Cenário</mat-card-title>
<mat-form-field appearance="outline" style="width:40%">
<mat-label>Nome do Cenário:</mat-label>
<input matInput type="text" formControlName="nomeCenario" [(ngModel)]="cenario.nome" maxlength="100" />
</mat-form-field>
<button mat-button (click)="incluirCenario()" color="primary" >Incluir
<mat-icon>add</mat-icon>
</button>
</mat-card>
Your question was not very clear, could post the code part of the list in the question?
– LeAndrade