The a simple ternary operator can be used like this within html:
<div> {{ showStringOneFlag ? 'Display String 1' : 'Display String 2' }} </div>
This may be more convenient than setting a string variable 20 times in javascript.
My question is if the ternary operator is too expensive to be executed each digest cycle? Should this function be avoided or used sparingly? Is its footprint minimal on the digest cycle and there is no need to worry about it? Everywhere I look for an answer I see that it is comparable to an if/else statement in terms of speed, but in html there isn't really an equivalent to an if/else statement.