I my angular 2 app, I have a label which shows the user current amount of points.
When the number of points is changed, I want to change the label's class for a short time, In order to make some kind of animation to let the user know something has changed.
<label class="label label-primary">
{{userService.user.points}}
</label>
In my service I get the user points using an observable and I can check if the number of points has changed using:
if (this.userData.points != data.user.points)
How I can change the label's class for a short time if the number of points has changed?