nx-primeng-sakai-v17/src/app/components/misc/misc.component.ts
2021-12-28 13:29:25 +03:00

20 lines
460 B
TypeScript
Executable File

import {Component, OnInit} from '@angular/core';
@Component({
templateUrl: './misc.component.html',
})
export class MiscComponent implements OnInit {
value = 0;
ngOnInit() {
const interval = setInterval(() => {
this.value = this.value + Math.floor(Math.random() * 10) + 1;
if (this.value >= 100) {
this.value = 100;
clearInterval(interval);
}
}, 2000);
}
}