Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 3x 3x 24x 24x 24x 24x 24x 24x | import { Directive, ElementRef, Input, OnChanges, SimpleChanges } from "@angular/core" @Directive({ selector: "[ccRiskProfileBar]", standalone: true }) export class RiskProfileBarDirective implements OnChanges { @Input() ccRiskProfileBar = 0 constructor(private element: ElementRef) {} ngOnChanges(changes: SimpleChanges) { if (changes.ccRiskProfileBar) { this.element.nativeElement.style.display = this.ccRiskProfileBar > 0 ? "flex" : "none" this.element.nativeElement.style.width = `${this.ccRiskProfileBar}%` this.element.nativeElement.style.color = this.ccRiskProfileBar > 5 ? "black" : "rgba(0,0,0,0)" } } } |