title: Angular - how to pass ng-model from ng-repeat to a function and to scope
body: <p>I have the following code:</p>
  
  <pre><code>&lt;form ng-submit="addRow($index)"&gt;
      &lt;input type="text" ng-repeat="column in table.columns" ng-model="column"&gt;
      &lt;input type="submit" value="add row"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Live code here:</p>
  
  <p><a href="http://jsfiddle.net/muehvxx1/" rel="nofollow">http://jsfiddle.net/muehvxx1/</a></p>
  
  <p>What I'm trying to do is that whenever you click on the "Add Row" button, a new object is added to the scope (to the form's parent object) passing all values from the form's fields.</p>
  
  <p>So far you can add an object to the correct parent (that works), but it doesn't pass the fields' values.</p>