refactor: migra decoradores a signals (input/output/viewChild/contentChild)

This commit is contained in:
2026-07-27 22:01:52 +02:00
parent c84de249bf
commit c046e6ac23
140 changed files with 1679 additions and 1536 deletions

View File

@@ -1,15 +1,15 @@
import { Directive, HostBinding, Input } from '@angular/core';
import { Directive, HostBinding, input } from '@angular/core';
@Directive({ selector: '[pi-value]', })
export class PiValueDirective {
@HostBinding('class') get classes(): string | boolean {
return ['pi-value', this.value > 0 ? 'is-positive' : 'is-negative'].join(' ');
return ['pi-value', this.value() > 0 ? 'is-positive' : 'is-negative'].join(' ');
}
@Input() value!: number;
readonly value = input.required<number>();
checkValue(): string {
if (this.value > 0) {
if (this.value() > 0) {
return 'is-positive';
} else {
return 'is-negative';