title: Angularjs binding not working on array of complex object
body: <p>Given this controller:</p>
  
  <pre><code> angular.module("upload.app").controller("upload",[upload]);
  
   function upload(){
      var me = this;
  
       me.uploadList = [{Name: "Test Upload",
                         Id: 1,
                         NewFiles: []
                       }];
       me.selectedUpload = me.uploadList[0];
       me.setSelected = function(upload) {
          me.selectedUpload = upload;
       }
       ...
       me.addFilesToUpload = function(element){
          me.selectedUpload.NewFiles = element.files;
       }
  </code></pre>
  
  <p>and this html:</p>
  
  <pre><code>   &lt;div ng-controller="upload as vm"&gt;
         &lt;input id="filechooser" type="file" multiple onchange="angular.element(this).scope().vm.addFilesToUpload(this)" /&gt;
         &lt;table&gt;
            &lt;tbody&gt;
               &lt;tr ng-repeat="up in vm.uploadList" ng-click="vm.setSelected(up)"&gt;
                   &lt;td&gt;{{up.Name}}&lt;br /&gt;{{up.NewFiles.length}}&lt;/td&gt;
               &lt;/tr&gt;
            &lt;/tbody&gt;
         &lt;/table&gt;
  
         &lt;table&gt;
             &lt;tbody&gt;
                &lt;tr ng-repeat="file in vm.selectedUpload.NewFiles"&gt;
                   &lt;td&gt;{{file.name}}&lt;/td&gt;
                &lt;/tr&gt;
             &lt;/tbody&gt;
         &lt;/table&gt;
     &lt;/div&gt;  
  </code></pre>
  
  <p>I would expect that when the input onchange event calls <code>addFilesToUpload()</code> and the files are then added to the <code>NewFiles</code> property, that Angularjs would automatically update the view ... in this case, <code>{{up.NewFiles.length}}</code> value in the first table and the second table that lists the files.</p>
  
  <p>However, nothing is being updated until I click on my row in the first table which, as you can see, fires the setSelected function on my controller.</p>
  
  <p>How can I get Angular to refresh when the <code>NewFiles</code> property is changed as well?</p>
  
  <p><strong>Sorry, just fixed the fiddle -- forgot to save it originally</strong>
  See this <a href="http://jsfiddle.net/HB7LU/2857/" rel="nofollow">jsfiddle</a>.  Begin by clicking on the Test Upload.  Now select files.  Nothing happens.  Click again on Test Upload and you'll see all the bindings refreshed.</p>