I wanted to have some idea about whether binding to data member is better in performance vs binding to a function?
e.g. which of the below statement will have better performance?
1)
<myComp *ngIf="isThisTrue"></mycomp>
where isThisTrue is being set via a method
checkIfTrue(data){
this.isThisTrue = data;
}
where this checkfTrue() is being called on receiving an event from an observable.
or
2)
<mycomp *ngIf="seeIfItHasBecomeTrue()"></mycomp>
where seeIfItHasBecomeTrue checks to see whether this.isTrue has become true or not.
I clearly feel that binding to data member should be faster, but I am not sure if this will always be faster? or if there are some gray areas? Also, if it is faster then how much?