title: How to use ng-if with input textbox alongwith ng-model?
body: <p>I am using angularjs.</p>
  
  <p>In my html I have 2 input boxes</p>
  
  <pre><code>edit = false;
  
  &lt;input type="text" value=""  data-ng-if="edit" ng-model="name"&gt;
  &lt;input type="text" value="" data-ng-if="!edit" ng-model="singleAppDetails.name"&gt;
  </code></pre>
  
  <p>so here I wanted to show only one input box at a time based on some condition.
  But i guess ng-if is not working.Basically if <strong>edit == true</strong> i want to show <strong>singleAppDetails.name</strong> and if <strong>edit == false</strong> then <strong>name</strong></p>