title: bind a textbox value if checkbox is checked
body: <p>how to pass a textbox value to controller based on condition .
  if checkbox is checked then bind the textbox with object value and pass to the controller other wise just leave it blank and pass the user input to controller.. what i am doing is not working. what is wrong with my code it is working in the case if checkbox is checked.</p>
  
  <pre><code>$scope.Product = [
          {"ProductID":12,"LNumber":"hrx",weght:"2"},
          {"ProductID":13,"LNumber":"pty",weght:"1"}
      ]
  
  &lt;div&gt;
  &lt;div&gt;
    &lt;input type="checkbox" data-ng-model="Copyknotes" /&gt;
    &lt;span &gt;Copy notes from&lt;/span&gt;
  &lt;/div&gt;
  
  &lt;table data-ng-repeat="Item in Product track by $index"&gt;                                          
     &lt;tr &gt;
       &lt;td&gt;                                              
          &lt;input type="radio" name="groupName_{{Item.ProductID}}"  data-ng-model ="Item.isSelected"  /&gt;
       &lt;/td&gt;
       &lt;td data-ng-if="Copyknotes == true"&gt;
         &lt;input type="text" data-ng-model="Item.LNumber"&gt;
        &lt;/td&gt;
        &lt;td data-ng-if="Copyknotes == false" id="hi"&gt;
        &lt;input type="text" data-ng-model="Item.LNumber="""&gt;
         &lt;/td&gt;
         &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>