title: Knockout JS Inline Ternary
body: <p>I'm trying to check if some data is empty, and then either display the data, or a message.</p>
  
  <p>I've got the following code at the moment which displays my text and adds ellipses to the end of it.</p>
  
  <pre><code>&lt;p data-bind="text:$data['Preview Text'] + '...'"&gt;&lt;/p&gt; 
  </code></pre>
  
  <p>Ideally, this would check the <code>preview text</code> and if there is none then it would return another message instead. I've had a go at making this happen but I can't get it to work.</p>
  
  <pre><code>&lt;p data-bind="text: preview() ? $data['Preview Text'] + '...' : 'aaaaaaaa'"&gt;&lt;/p&gt;
  </code></pre>