import {computedFrom} from 'aurelia-framework';
export class Person {
firstName: string = 'John';
lastName: string = 'Doe';
@computedFrom('firstName', 'lastName')
get fullName(): string {
return `${this.firstName} ${this.lastName}`;
}
}
@computedFrom
tells the binding system which expressions to observe. When those expressions change, the binding system will re-evaluate the property (execute the getter). This eliminates the need for dirty checking and can improve performance. The