I am working on my portfolio website in Angular 2 and would like to include a skill matrix. this could be any svg image or character, but for testing I use a square provided by font-awesome.
<tbody *ngFor="let skill of skills">
<tr>
<td>{{skill.name}}</td>
<td>{{skill.mastering}}</td>
<td>{{skill.classification}}</td>
</tr>
skill.mastering is a value from 0 to 10 and the idea is to use <i class="fa fa-square" aria-hidden="true"></i>
one time for each number until skill.mastering value is reached. I have no idea how to implement this. In any other language I would write something like this in pseudo:
while skill.mastering > 0
print square