I have a question regarding performance in Angular. Is there a performance difference between referencing a public property and a getter defined in a component?
Example:
I have a template, and it references isActivate that is defined in a component like this:
<div *ngIf="isActivate">Do stuff...</div>
In the component:
export class TestComponent {
public isActivate: boolean;
But it can have a getter instead:
public get isActivate(): boolean {
return true;
}
In performance wise, which is better, and why?