mirror of https://github.com/abpframework/abp.git
Browse Source
Replaces traditional @Input() properties with Angular's new input() signal API in multiple components, directives, and templates. Updates all usages to call input signal functions, ensuring compatibility and reactivity. This change modernizes the codebase, improves type safety, and prepares for future Angular features.pull/24777/head
41 changed files with 393 additions and 403 deletions
@ -1,13 +1,13 @@ |
|||
import { Component, HostBinding, Input } from '@angular/core'; |
|||
import { Component, HostBinding, input } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'abp-card-body', |
|||
template: ` <div [class]="cardBodyClass" [style]="cardBodyStyle">
|
|||
template: ` <div [class]="cardBodyClass()" [style]="cardBodyStyle()">
|
|||
<ng-content></ng-content> |
|||
</div>`,
|
|||
}) |
|||
export class CardBodyComponent { |
|||
@HostBinding('class') componentClass = 'card-body'; |
|||
@Input() cardBodyClass: string; |
|||
@Input() cardBodyStyle: string; |
|||
readonly cardBodyClass = input<string>(undefined); |
|||
readonly cardBodyStyle = input<string>(undefined); |
|||
} |
|||
|
|||
@ -1,14 +1,14 @@ |
|||
import { Component, Input } from '@angular/core'; |
|||
import { Component, input } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'abp-card', |
|||
template: ` <div class="card" [class]="cardClass" [style]="cardStyle">
|
|||
template: ` <div class="card" [class]="cardClass()" [style]="cardStyle()">
|
|||
<ng-content></ng-content> |
|||
</div>`,
|
|||
imports: [], |
|||
}) |
|||
export class CardComponent { |
|||
@Input() cardClass: string; |
|||
readonly cardClass = input<string>(undefined); |
|||
|
|||
@Input() cardStyle: string; |
|||
readonly cardStyle = input<string>(undefined); |
|||
} |
|||
|
|||
Loading…
Reference in new issue