title: bound element inside ngIf does not update binding
body: <p>I have written a angularjs directive.
  in this directive's template I have added an ngIf directive and within it I display an input that is bound to my directive's scope.</p>
  
  <pre><code>&lt;div ng-if="bool"&gt;&lt;input ng-model="foo"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I noticed, after a lot of trial and error that the ngIf directive cause the model to not get updated when the input text is changed. If I change it to ngShow everything works as expected.</p>
  
  <p>I am looking for an explanation of this difference</p>
  
  <p><a href="http://jsfiddle.net/elewinso/WaFs2/" rel="noreferrer">I have created a jsfiddle here</a></p>