As I delve into an existing Angular application, I've noticed a pattern where values used in templates across many components are actually properties that are being accessed through getters and setters without any additional logic:
<input type="number" [(ngModel)]="age" [disabled]="formDisabled">
get formDisabled() {
return this._formDisabled;
}
set formDisabled(value: boolean) {
this._formDisabled = value;
}
Given our app's performance objectives, I recall that in AngularJS, using functions in templates impacted performance due to the computation required even for simple value returns. Does this remain true in modern Angular (version 5), and should I consider replacing these redundant accessors with direct field references if encountered?
Appreciate your insights.