title: ng-model as a variable in a bidimensional array
body: <pre><code>  &lt;p ng-repeat="row in matrix"&gt;
      &lt;span ng-repeat="column in row"&gt;
        &lt;input type="text" style="width: 20px; text-align: center;" ng-model="column" ng-change="{{column = }}"&gt;
      &lt;/span&gt;
    &lt;/p&gt;
  </code></pre>
  
  <p>And on my controller:</p>
  
  <pre><code>$scope.matrix = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
  </code></pre>
  
  <p>I have little piece of code and I want that little text input box to be associated with <code>matrix[i][u]</code>. I know I can use <code>ng-model=</code> to make the text box be associated with a certain variable.</p>
  
  <p>However, I want it to go both ways - changing the variable will change the text box value and changing the text box value will change the variable. However, when I have <code>ng-model</code> on an input text box I can't seem to edit its value, as it'll always "reset" to its default.</p>
  
  <p>I know I can use <code>ng-change</code> but I made the middle line this:</p>
  
  <pre><code>&lt;input type="text" style="width: 20px; text-align: center;" ng-model="column" ng-change="update"&gt;
  </code></pre>
  
  <p>And it didn't work to call the $scope.update() function. I also still can't edit the text box value.</p>
  
  <p>tl;dr: How can I have a text box with an <code>ng-model</code> and allow editing it to edit both the text box value and the variable on ng-model.</p>