title: handlebars dynamic table row
body: <p>I am using Ember with Handlebars. I have a situation where I need to dynamically create new table rows after 3 iterations of an array. </p>
  
  <pre><code>&lt;table&gt;
  {{#each items as |item itemIndex|}}
      {{#if (compare (mod itemIndex 3) '===' 0)}}&lt;tr&gt;{{/if}}
          &lt;td&gt;{{item.id}}&lt;/td&gt;  
      {{#if (compare (mod itemIndex 3) '===' 2)}}&lt;/tr&gt;{{/if}}
  {{/each}}
  &lt;/table&gt;
  </code></pre>
  
  <p>For the sake of example, please assume that there will always be a factor of 3 in the items array. When I try to save this code, I'm getting a syntax error that there is no close  tag matching the open tag. How can I dynamically create the  and  without the syntax error?</p>
  
  <p>I'm using ember CLI version 2.9.1. </p>