Below is what I have now:
<div class="reviews">
<a href="#">
<i *ngIf="product.rating.avgStars >= 1" class="fa fa-star"></i>
<i *ngIf="product.rating.avgStars >= 2" class="fa fa-star"></i>
<i *ngIf="product.rating.avgStars >= 3" class="fa fa-star"></i>
<i *ngIf="product.rating.avgStars >= 4" class="fa fa-star"></i>
<i *ngIf="product.rating.avgStars >= 5" class="fa fa-star"></i>
<span class="amount">({{product.rating.reviewCount}} Reviews)</span>
</a>
As you may have guessed, it will repeat a star icon for the number of stars a product has. It works as is, however, I feel like there must be a better way. Ideally I would like to use:
<i *ngFor="+product.rating.avgStars" class="fa fa-star"></i>
I am aware that I can potentially use directives or pipes to encapsulate this functionality; I am simply asking is there is a way to use built in angular directives to arbitrarily repeat an HTML tag.