I'm attempting to animate a list of items in Angular 2, but for some reason, it's not working at all.
What I'm doing is retrieving a HTMLCollection using getClass and then adding a class with a timeout.
platform.ready().then((readySource) => {
let workoutItems: HTMLCollection = document.getElementsByClassName("my-workout-item");
for (var i = 0; workoutItems[i]; i++) {
workoutItems[i].classList.add("fadeInUp");
setTimeout(function () {
console.log("test");
workoutItems[i].classList.add("fadeInUp");
}, 1000);
}
I'm not sure why this code isn't working. Can anyone help me bring this to life?
Thanks a bunch :)