Animation in Angular Progress Bar
14 Sep 20261 minute to read
Progress Bar support to animate the progress by using animation property. Enable the animation by setting enable property and also you can control the speed by using duration property.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { ProgressBarModule, ProgressAnnotationService } from '@syncfusion/ej2-angular-progressbar'
import { Component, OnInit } from '@angular/core';
import { AnimationModel } from '@syncfusion/ej2-progressbar';
@Component({
imports: [
ProgressBarModule
],
providers: [ProgressAnnotationService],
standalone: true,
selector: 'my-app',
template: `
<ejs-progressbar id='percentage' type='Linear' value=100 [animation]='animation'>
</ejs-progressbar>
`
})
export class AppComponent implements OnInit {
public animation?: AnimationModel;
ngOnInit(): void {
this.animation = { enable: true, duration: 2000, delay: 0 };
}
}import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
bootstrapApplication(AppComponent).catch((err) => console.error(err));