title: ng-if not working, but ng-show works
body: <p>I was trying to display items in a list with Angular js. I hope to organize the items with 3 items in a row with the following code: </p>
  
  <pre><code>  &lt;div class='row-fluid' ng-repeat="region in regions" ng-show="$index % 3 == 0"&gt;
  
        &lt;span  class='span4 checkbox'&gt;
          &lt;input type="checkbox"  ng-model="regions[$index].checked" ng-hide='regions[$index].text == null'&gt; {{regions[$index].text}}
        &lt;/span&gt;
        &lt;span  class='span4 checkbox'&gt;
          &lt;input type="checkbox"  ng-model="regions[$index+1].checked" ng-hide='regions[$index+1].text == null'&gt; {{regions[$index+1].text}}
        &lt;/span&gt;
        &lt;span  class='span4 checkbox'&gt;
          &lt;input type="checkbox"  ng-model="regions[$index+2].checked" ng-hide='regions[$index+2].text == null'&gt; {{regions[$index+2].text}}
        &lt;/span&gt;       
    &lt;/div&gt;
  </code></pre>
  
  <p>If works fine when I use "ng-show". But when I switch it with 'ng-if', it doesn't work at all. (it shows all the 'regions' and does not filter with $index % 3 == 0). I was thinking "ng-if" should be a more standard way to implement my layout design but have no idea why it does not work at all. </p>
  
  <p>Following is the code that won't work:</p>
  
  <pre><code>  &lt;div class='row-fluid' ng-repeat="region in regions" ng-if="$index % 3 == 0"&gt;
  
        &lt;span  class='span4 checkbox'&gt;
          &lt;input type="checkbox"  ng-model="regions[$index].checked" ng-hide='regions[$index].text == null'&gt; {{regions[$index].text}}
        &lt;/span&gt;
        &lt;span  class='span4 checkbox'&gt;
          &lt;input type="checkbox"  ng-model="regions[$index+1].checked" ng-hide='regions[$index+1].text == null'&gt; {{regions[$index+1].text}}
        &lt;/span&gt;
        &lt;span  class='span4 checkbox'&gt;
          &lt;input type="checkbox"  ng-model="regions[$index+2].checked" ng-hide='regions[$index+2].text == null'&gt; {{regions[$index+2].text}}
        &lt;/span&gt;       
    &lt;/div&gt;
  </code></pre>
  
  <p>Could you please help me with that?</p>