I am trying to display a list of categories for a Blog in Angular using ngFor. However, I am facing an issue where it is displaying some categories multiple times, as if it is pulling in all the blogs instead of just the categories that are shared among them. I hope my question was clear.
Here is the code snippet from my HTML file:
<aside class="categories">
<h2 class="aside-title">Categories</h2>
<ul *ngFor="let data of datas; index as i">
<li class="nav-elipse-blue"><a [routerLink]="['/page', datas.category]" title="Blog CSS
articles">{{ data.category.name }}</a></li>
</ul>
</aside>