I'm attempting to incorporate span icons/glyph-icons using Angular within a td before displaying the country. I've utilized the code below to achieve this, but I'm looking for a more dynamic and elegant solution. Your assistance is greatly appreciated.
https://i.stack.imgur.com/R7l2D.png
$scope.countries = [
{name: 'Australia', rating: 0, other: "lorem ipsum"},
{name: 'India', rating: 1, other: "lorem ipsum"},
{name: 'Canada', rating: 3, other: "lorem ipsum"},
{name: 'Mexico', rating: 2, other: "lorem ipsum"},
{name: 'UK', rating: 4, other: "lorem ipsum"},
{name: 'Germany',rating: 2, other: "lorem ipsum"},
{name: 'USA',rating: 1, other: "lorem ipsum"}
];
<tr ng-repeat="country in countries">
<td>
<span ng-if="country.rating == 1">
<span class="glyphicon glyphicon-star"></span>
</span>
<span ng-if="country.rating == 2">
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
</span>
<span ng-if="country.rating == 3">
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
</span>
<span ng-if="country.rating == 4">
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
</span>
<span>
{{ country.name}}
</span>
</td>
<td>{{country.other}}</td>
</tr>