The only difference between calling a function and evaluating an expression in JavaScript , Angular doesn't matter here. A function call is usually minimally slower, so the first option should be a little faster.
Angular view compiler updateRenderer following code for the updateRenderer function:
function(_ck, _v) { var _co = _v.component; ---> var currVal_0 = _ck(_v, 3, 0, ((_co.condition1 && _co.condition2) && _co.condition3)); _ck(_v, 2, 0, currVal_0); }
and
function(_ck, _v) { var _co = _v.component; --> var currVal_0 = _ck(_v, 3, 0, _co.shouldDisableField()); _ck(_v, 2, 0, currVal_0); }
As you can see, only one line is different, and all that matters.
You can learn more about the updateRenderer function in the article:
AngularInDepth.com
source share