Closed code-tofu closed 1 year ago
Modal target was the same for each ngfor element. All buttons called the first modal element:
data-bs-target="#staticBackdrop"
id="staticBackdrop"
Solved using attribute binding:
[attr.id]="'backdrop' + item.productID"
[attr.data-bs-target]="'#backdrop' + item.productID"
Modal loads data only from first element in NgFor. Suggest to use ngcontent and push the info to catalogue main