title: How to update ng-repeat variable using autocomplete?
body: <p>Thanks to SOF for solving my last issue in angularjs and autocomplete.
  <a href="https://stackoverflow.com/questions/19002571/angularjs-with-jquery-auto-complete-not-working">Angularjs with jquery auto complete not working</a></p>
  
  <p>Now, I have an issue of same type in ng-repeat...</p>
  
  <p>In View</p>
  
  <pre><code>&lt;tr data-ng-repeat="item in pagedItems"&gt;
                      &lt;td title={{item.name}}&gt;{{item.name}}&lt;/td&gt;
                      &lt;td&gt; &lt;input type=text auto-complete ng-model="item.upload_status"&gt;
                      Upload status: {{item.upload_status}}&lt;/td&gt;
                      &lt;td title={{item.lat}}&gt;{{item.lat}}&lt;/td&gt;
                      &lt;td title={{item.lon}}&gt;{{item.lon}}&lt;/td&gt;
                  &lt;/tr&gt;
  </code></pre>
  
  <p>In Directive</p>
  
  <pre><code>myapp.directive('autoComplete', function(autoCompleteDataService) {
  return {
      restrict: 'A',
      link: function(scope, elem, attr, ctrl) {
  
          elem.autocomplete({
  
              source: autoCompleteDataService.getSource(), 
  
              select: function( event, ui ) {
                  scope.$apply(function() { this.item.upload_status = ui.item.value; });
              },
  
              change: function (event, ui) {
                  if (ui.item === null) {
                      scope.$apply(function() { scope.foo = null });
                  }
              },
              minLength: 2
          });
      }
  };
  </code></pre>
  
  <p>});</p>
  
  <p>It is giving error as,</p>
  
  <p>TypeError: Cannot set property 'upload_status' of undefined</p>
  
  <p>Any idea to update upload_status is appreciated..</p>