I want to update a view only when the total votes reach a number that is a multiple of ten. I am incrementing a random element in an array called rows
every 10 milliseconds, ultimately adding up to the total number of votes. Is there a simple way in angular 2 to bind and show model value in a template only when a specific condition is met?
Template:
<div>
<ul class="list">
<li class="item" *ngFor="let row of rows">{{ row }}</li>
</ul>
</div>
<h3 class="title">Total number of votes: {{ votes }}</h3>