title: How to disable one input field when one is selected in AngularJS? (both using same ng-model)
body: <p>Hi I have two input fields. input field A(drop-down) and input field B. Both of them are posting same value (same ng-model). What I need to achieve is when the user select one option from the dropdown button the second input field need to cleared. How can I do that using AngularJS? Am very new to AngularJS. Thanks in advance. </p>
  
  <pre><code>&lt;table align="center"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;div class="input-group"&gt;
                          &lt;span class="input-group-addon"&gt;&lt;b&gt;BB&lt;/b&gt;&lt;/span&gt;
                          &lt;input class="form-control" type="input" ng-model="final_data.bb" readonly&gt;
                      &lt;/div&gt;
                  &lt;/td&gt;
  
                      &lt;p align="center" ng-show="processing['update_ms']" ng-class="processing['update_mst'].class" ng-cloak&gt;
                          {{ processing['update_ms'].msg }}
                      &lt;/p&gt;
                  &lt;td&gt;
                      &lt;div class="input-group"&gt;
                          &lt;span class="input-group-addon"&gt;&lt;b&gt;InputA&lt;/b&gt;&lt;/span&gt;
                          &lt;select class="form-control" ng-change="get_mass(); disableMass() " ng-model="final_data.mas" ng-options="m as m for m in maslist" required ng-cloak&gt;
                          &lt;/select&gt; &amp;nbsp;
                      &lt;/div&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;div class="input-group"&gt;
                          &lt;span class="input-group-addon"&gt;&lt;b&gt;InputB*&lt;/b&gt;&lt;/span&gt;
                          &lt;input class="form-control" ng-disabled="isSelected" ng-model="final_data.mas" type="input"&gt;&amp;nbsp;
                      &lt;/div&gt;
  
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
  </code></pre>