title: RactiveJS: how can I test equality in a template expression?
body: <p>I'm using a Ractive.JS binding:</p>
  
  <pre><code>var alertsBinding = new Ractive({
      el: '.alerts',
      template: alertsTemplate,
      data: {
          alerts: alerts,
          selectedAlertID: null
      }
  });
  </code></pre>
  
  <p>The template uses a <a href="http://docs.ractivejs.org/latest/expressions" rel="nofollow noreferrer">template expression</a> to detect if an item is the currently selected item and add a class accordingly:</p>
  
  <pre><code>&lt;div class="alert {{ id === selectedAlertID ? 'selected' }}"&gt;
    ...
  &lt;/div&gt;
  </code></pre>
  
  <p>When an item is selected, I run:</p>
  
  <pre><code>alertsBinding.set({selectedAlertID: selectedAlert.id});
  </code></pre>
  
  <p>After setting I can see the condition is always false, even when condition should be true. I have also checked by adding the following:</p>
  
  <pre><code>id{{ id}} selected{{ selectedAlertID}}
  </code></pre>
  
  <p>Inside the alert to confirms the item is actually selected.</p>
  
  <p><img src="https://i.stack.imgur.com/Wtip3.png" alt="enter image description here"></p>
  
  <p>Yet still the condition is false, and the class not set. </p>
  
  <p><strong>How can I test equality in a template expression?</strong></p>