Assigning the value for dropdown list by default
<p>I have locally assigned  country state city values in <code>$scope.countries</code> and passing it to backend, now in $scope.getValue() I will get values for the country state city from backend .But I am unable to assign the values i am getting from backend response to my ng-model <code>$scope.countrySrc</code>by default.</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html data-ng-app="myApp"&gt;

&lt;head&gt;
  &lt;link rel="stylesheet" href="style.css"&gt;
  &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"&gt;&lt;/script&gt;
  &lt;script src="script.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body data-ng-controller="testController"&gt;



  &lt;label for="country"&gt;Country *&lt;/label&gt;
  &lt;select id="country" ng-model="countrySrc" ng-options="country for (country, states) in countries" ng-change="GetSelectedCountry()"&gt;
    &lt;option value=''&gt;Select&lt;/option&gt;
  &lt;/select&gt;
  &lt;label for="state"&gt;State *&lt;/label&gt;
  &lt;select id="state" ng-disabled="!countrySrc" ng-model="stateSrc" ng-options="state for (state,city) in countrySrc" ng-change="GetSelectedState()"&gt;
    &lt;option value=''&gt;Select&lt;/option&gt;
  &lt;/select&gt;
  &lt;label for="city"&gt;City *&lt;/label&gt;
  &lt;select id="city" ng-disabled="!countrySrc || !stateSrc" ng-model="city" ng-options="city for city in stateSrc"&gt;
    &lt;option value=''&gt;Select&lt;/option&gt;

  &lt;/select&gt;

  &lt;script&gt;
    angular
      .module('myApp', [])
      .run(function($rootScope) {
        $rootScope.title = 'myTest Page';
      })
      .controller('testController', ['$scope',
        function($scope) {


          $scope.countries = {

            'USA': {
              'Alabama': ['Montgomery', 'Birmingham'],
              'California': ['Sacramento', 'Fremont'],
              'Illinois': ['Springfield', 'Chicago']
            },
            'India': {
              'Maharashtra': ['Pune', 'Mumbai', 'Nagpur', 'Akola'],
              'Madhya Pradesh': ['Indore', 'Bhopal', 'Jabalpur'],
              'Rajasthan': ['Jaipur', 'Ajmer', 'Jodhpur']
            },
            'Australia': {
              'New South Wales': ['Sydney'],
              'Victoria': ['Melbourne']
            }
          };

          $scope.GetSelectedCountry = function() {
            $scope.strCountry = $scope.countrySrc;
          };
          $scope.GetSelectedState = function() {
            $scope.strState = $scope.stateSrc;
          };
UserService.getProfile.then(function (response) {


         $scope.strCountry = response.json.response.profile.country;
        };


    $scope.getProfile();
      ])
  &lt;/script&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>

<p>Userservice.jS:</p>

<pre><code>function getProfile(profile){
        return $http.post(url+'?request=' + JSON.stringify(profile)).then(handleSuccess, handleError('Error in saving profile details'));
    }
</code></pre>

<p>Response from backend:</p>

<pre><code>     {"response":{"json":{"session_id":"498","profile":
{"country":"Afghanistan",
"state":"Badakhshan",
"city":"Eshkashem",
"pincode":"54564","rolemandatory":1},"roles":[]}}}
</code></pre>