I'm currently trying to make an simple loader animation that basically increases an element based on a given percentage.
Now i saw that Angular 2 has an animation module and worked around a little bit and this basically only works for static animations.
I've got a loader component that's running an simple interval
var interval = setInterval(function(){
this.count++;
this.loading();
this.circleSize = window.innerWidth / 100 * this.count;
if(this.count >= 100) {
clearInterval(interval);
}
}.bind(this), 25);
Googling a little further i found angular 2 supports css by variable:
[style.width]="circleSize" however this doesn't seem to get updated with the interval.
Now i could a library like GSAP to achieve this but what do you guys recon would be the best/angular approach to do so?