title: How to Assign value with ng-change in angular js
body: <p>I have simple drop-down bind with angular model</p>
  
  <pre><code>&lt;select ui-select2="{allowClear:true}" ng-model="product.Id" ng-change="{value = product.Id == 0}" data-placeholder="Select Warranty"&gt;
        &lt;option&gt;&lt;/option&gt;
        &lt;option ng-repeat="product in products" value="{{product.Id}}"&gt;{{product.Code}}&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>How i can assign value depending on some condition in ng-change?  </p>