title: Angular: Using the ternary operator in html template
body: <p>The a simple ternary operator can be used like this within html:</p>
  
  <pre><code>&lt;div&gt; {{ showStringOneFlag ? 'Display String 1' : 'Display String 2' }} &lt;/div&gt;
  </code></pre>
  
  <p>This may be more convenient than setting a string variable 20 times in javascript.</p>
  
  <p>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.</p>