Currently, I have a TypeScript class within an Angular application that consists of three properties. The first two properties can be changed independently using [(ngModel)]. However, I am looking for a way to set the third property as the sum of the first two, and have it automatically update whenever either of the other two properties change.
My initial thought was to use observables or BehaviorSubject, but I feel like that might be overly complex for this situation. Is there a simpler solution?
The goal is to have the third property accessible through interpolation.
export class Character {
initialStat: number;
advancementStat: number;
totalStat: ???
}