I am facing an issue with populating every two strings from an array in a row using ngFor. This is my current attempt:
<div class='row wow fadeInUp' *ngFor='let index of myArray; let i = index;'>
<div class='col-md-6'>
<md-card>
<md-card-header>
<md-card-title>
{{index}}
</md-card-title>
</md-card-header>
</md-card>
</div>
<div class='col-md-6' *ngIf='i+1 < myArray.length'>
<md-card>
<md-card-header>
<md-card-title>
{{myArray[i+1]}}
</md-card-title>
</md-card-header>
</md-card>
</div>
</div>
Whenever I add a new element, it duplicates the previous one and I cannot figure out why. How can I ensure that two elements are displayed in each row when using ngFor?