1
<div id="sections" *ngFor="let section of clothesListArr?.addNewClothes">
    <h5>{{section.add_Sections}}</h5>
</div>

I want to write an if statement inside <h5> to check if the string is already exist 'printed', if it's exist I want to skip it and print the next one, so I don't have a duplicate value

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Fatima36
  • 13
  • 4
  • 1
    You can get a better aproach: reduce your array to store uniques values, see, e.g. https://stackoverflow.com/questions/15125920/how-to-get-distinct-values-from-an-array-of-objects-in-javascript – Eliseo Dec 23 '18 at 09:25
  • https://stackoverflow.com/questions/34417250/filtering-an-array-in-angular2 – Utpaul Dec 23 '18 at 10:11

0 Answers0