sigma-ng-progress
Version:
24 lines (21 loc) • 634 B
text/typescript
import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';
export class ProgressBarComponent implements OnInit {
bgClass: string;
value: number = 0;
max: number = 100;
ngOnInit(): void {
}
getWidth() {
let value = this.value * 100 / this.max;
if(value > 100) value = 100;
return value + '%';
}
getValue(): string {
return this.max + ' / ' + this.value;
}
}