title: Are angularjs has any ways to update the ng-model and the input text value separately?
body: <p>I have a directive to get the lat log form google map api 
  and autocomplete the address</p>
  
  <pre><code> .directive('googleplace', function() {
          return {
              require: 'ngModel',
              link: function(scope, element, attrs, model) {
                  var options = {
                      types: [],
                      componentRestrictions: {}
                  };
                  scope.gPlace = new google.maps.places.Autocomplete(element[0], options);
                  google.maps.event.addListener(scope.gPlace, 'place_changed', function() {
                      var geoComponents = scope.gPlace.getPlace();
                      var latitude = geoComponents.geometry.location.lat();
                      var longitude = geoComponents.geometry.location.lng();
  
                      var location = {
                          address : element.val(),
                          latitude : latitude,
                          longitude : longitude
                      };
  
                      attrs.$set('data-lat', location.latitude);
                      attrs.$set('data-lon', location.longitude);
  
                      //if ng-model=locations 
                      //input text will become [Object][Object]
                      //model.$setViewValue(location);
  
                      model.$setViewValue(location.address);
                  });
              }
          };
      });
  </code></pre>
  
  <p>and the html code:</p>
  
  <pre><code>  &lt;input type='text' ng-model="locations[$index].address" googleplace ng-repeat="location in locations"/&gt;
  </code></pre>
  
  <p>model - <code>locations</code> is an object array like this:</p>
  
  <pre><code>[{
    address : 'xxxxxxx',
    latitude : 22.3432,
    longitude : 144.34234
  },{
    address : 'aaaaa',
    latitude : 22.3233,
    longitude : 145.3432
  } ...]
  </code></pre>
  
  <p>I change the text in input, the address is updated  , that's ok.
  but How can i get update the latitude and longitude in <code>locations</code></p>
  
  <p>if the ng-model is <code>locations</code> instead of <code>locations.address</code>, the input text become <code>[Object] [Object]</code></p>
  
  <p>I try to use attribute <code>data-lat</code> and <code>data-lon</code>, but there is no easy way to get the attribute value on change, since <code>ng-change</code> cannot pass the target DOM to controller function.</p>
  
  <p>Are there are a way to update the model and the input text value separately??
  Or a way to get the attribute value on change??</p>