how to display selected value of dropdown in input text fields in angular js
<p>html file:</p>

<pre><code>&lt;select ng-model="shipping" ng-options="shipping.shipping for shipping in shipAddress"&gt;
 &lt;option value=''&gt;--Select Address --&lt;/option&gt;
&lt;/select&gt;

&lt;form name="shippingForm" class="form-horizontal" role="form"&gt;
 &lt;div class="form-group"&gt;
    &lt;p class="control-p col-sm-2" for="Address"&gt;Address Line1&lt;/p&gt;
    &lt;div class="col-sm-10"&gt;
        &lt;input type="text" name="Address" placeholder="Address Line1"
         ng-model="shipping.addressLine1" class="input-width" ng-init ="shipping.addressLine1"/&gt;
   &lt;/div&gt;
 &lt;/div&gt;

 &lt;div class="form-group"&gt;
      &lt;p class="control-p col-sm-2" for="Address2"&gt;Address Line2:&lt;/p&gt;
      &lt;div class="col-sm-10"&gt;
           &lt;input type="text" name="AddressLine" placeholder="Address Line2" ng-model="shipping.addressLine2" class="input-width" /&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
</code></pre>

<p>js file:</p>

<pre><code>if (data){  
          console.log(data);      
          $scope.addressToShip = data; 
          var ShipAddress=[];
          storeLocally.set('ship Info', data);
          if(data.addressLine2 == null){
            $scope.shipAddress = data.map(function(address) {
                  return {
                  shipping: address.addressLine1 
                  };

               });
           }
          else{
          $scope.shipAddress = data.map(function(address) {
              return {
              shipping: address.addressLine1 +', '+ address.addressLine2
              };

           });
      } 
      }
 },
    function (data) {
        //if (data.status == 500) {
        //  $scope.addressError = "Oops! No Address Found!";    
        };    
</code></pre>

<p>data:</p>

<pre><code>{0 :"123 waller st,suite#220"},
{1 :"323 waller st,suite#230"}
</code></pre>

<p>The problem is the form I am using intially to save data. Once data is saved to db it is coming in dropdown. After choosing one value from dropdown it should come to text fields.</p>

<p>I have tried so far ng-model by using same variable names,even though form's  ng-model and dropdown's ng-model have same variable i.e. shipping.. But it didn't work. Please help me out what I am missing in here.</p>