Aug 23, 2017 · 1 min read
Thanks Alex! Much appreciated. That’s not going to work. To achieve dynamic animations, as in during runtime, you need to use AnimationBuilder. Check this Plunker for a quick and dirty example (About page).
animateTo(to: number) {
const loaderAnimation = this.builder.build([
animate('350ms cubic-bezier(.35, 0, .25, 1)',
style({ width: '{{to}}%' }))
]); return loaderAnimation
.create(this.loadingBar.nativeElement, {params: { to }});
}
