title: Angularjs ng-model doesn't work inside ng-if
body: <p>Here is the fiddle showing the problem. <a href="http://jsfiddle.net/Erk4V/1/" rel="noreferrer">http://jsfiddle.net/Erk4V/1/</a></p>
  
  <p>It appears if I have an ng-model inside of an ng-if, the model does not work as expected.</p>
  
  <p>I am wondering if this is a bug or if I am misunderstanding the proper usage.</p>
  
  <pre><code>&lt;div ng-app &gt;
      &lt;div ng-controller="main"&gt;
  
          Test A: {{testa}}&lt;br /&gt;
          Test B: {{testb}}&lt;br /&gt;
          Test C: {{testc}}&lt;br /&gt;
  
          &lt;div&gt;
              testa (without ng-if): &lt;input type="checkbox" ng-model="testa" /&gt;
          &lt;/div&gt;
          &lt;div ng-if="!testa"&gt;
              testb (with ng-if): &lt;input type="checkbox" ng-model="testb" /&gt;
          &lt;/div&gt;
          &lt;div ng-if="!someothervar"&gt;
              testc (with ng-if): &lt;input type="checkbox" ng-model="testc" /&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>