In parent.component.html
I have the following HTML
<button type="button" class="btn btn-secondary (click)="AddComponentAdd()">Address</button>
<app-addresse *ngFor="let addres of collOfAdd" [add]="addres"></app-addresse>
and in parent.component.ts
private collOfAdd: Array<AddresseComponent> = [];
AddComponentAdd() {
this.collOfAdd.push(AddresseComponent);
}
and in addresse.component.ts
@Input() add: string;
How do I make the component <app-addresse> appear several times in the parent component by clicking the button present in parent component?