import {Component, OnInit} from '@angular/core';
@Component({
selector: 'app-demo-progress-bar',
template: `
`,
styles: [`
`]
})
export class DemoProgressBarComponent implements OnInit {
timer: any;
progress = 0;
progressOption = {
showText: true
};
constructor() {
}
ngOnInit() {
this.timer = setInterval(() => {
if (this.progress === 100) {
clearInterval(this.timer);
this.timer = null;
} else {
this.progress += 10;
}
}, 1000);
}
}