title: Ember switch/index if, etc
body: <p>Ember seems to be quite lacking in the comparison department. You can only compare to zero using the #if helper and all the cool extended helpers people have written do not work with @index..., so you can't do something like </p>
  
  <pre><code>{{#each}}
      {{#xif '@index == 3'}}
          ....
      {{/xif}}
  {{/each}}
  </code></pre>
  
  <p>which would provide specialization(for @index == 3).</p>
  
  <p>Does anyone know how to essentially do the above? I have an loop but I need to specialize on certain indices. </p>
  
  <p>ideally a switch statement would be nice(possible to hack handlebars to add this?)</p>
  
  <p>e.g,</p>
  
  <pre><code>{{#each}}
      {{#switch @index}}
          {{case 0}}
              ....
          {{/case}}
          {{case 1}}
              ....
          {{/case}}
          {{default}}
              ....
          {{/default}}
      {{/switch}}
  {{/each}}
  </code></pre>
  
  <p>etc...</p>
  
  <p>Right now I'm having to use jquery to specialize the loop which makes for an inconsistent experience.</p>