title: Resolving ng-model outside the form
body: <p>I have an html file with 2 form elements with input elements inside both. I would be using the ng-if to select which form element I need. The input elements are bound to the same model. But I am unable to resolve it outside the form scope.</p>
  
  <pre><code>&lt;form ng-if="some_name == '1'"&gt;
   &lt;input ng-model="model_name"&gt;
  &lt;/form&gt;
  
  &lt;form ng-if="some_name == '2'"&gt;
   &lt;input ng-model="model_name"&gt;
  &lt;/form&gt;
  
  {{model_name}} //This is different from the value of either of the input elements
  //it has the initial value which i would assign : $model_name = "xyz"; in my associated js file
  </code></pre>