Structural directive to repeat an element N times based of a quantity
<ng-container *ngRepeat="5, let i = index">
<div>element N° {{i}}</div>
</ng-container>
<ng-container *ngRepeat="quantity, let i = index; let onRemove = onRemoveAt">
<div>element N° {{i}}</div>
<button (click)="onRemove(i); quantity -= 1">Delete</button>
</ng-container>
Nombre | Descripción |
---|---|
index | element position |
onRemoveAt | hook to trigger when delete and specific element |