title: $scope data is not updating in view for the first time
body: <p>controller.js</p>
  
  <pre><code>$scope.getElectInfo=function(){
          var selectedVal = $("#countriesList option:selected").val();
          if (selectedVal != 0) {
          $.get(APP_URL+ "/political/ElectionType/GetElectionTypesByCountry?countryId="
                                  + selectedVal,
                          function(data, status) {
                          $scope.data1=data;
                          console.log($scope.data1);
                          });
                      $scope.Structure = true;    
      }else
      {
      $scope.Structure = false;
      }
          }
  </code></pre>
  
  <p>html</p>
  
  <pre><code> &lt;select id="countriesList" ng-change="getElectInfo()" ng-model="getElectionInfo"&gt;
         &lt;/select&gt;
         &lt;div ng-show="Structure" class="content"&gt;
  
   &lt;figure class="org-chart cf"&gt;
  &lt;ul class="administration"&gt;
    &lt;li&gt;                  
      &lt;ul class="director"&gt;
        &lt;li&gt;
          &lt;ul class="subdirector"&gt;
          &lt;/ul&gt;
          &lt;ul class="departments cf"&gt;                             
            &lt;li&gt;&lt;a &gt;&lt;span ng-repeat="cname in country"&gt;{{cname.countryName}}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  
            &lt;li class="department dep-b" ng-repeat="types in data1"&gt;
              &lt;a &gt;&lt;span&gt;{{types.name}}&lt;/span&gt;&lt;/a&gt;
            &lt;/li&gt;
  </code></pre>
  
  <p>In the above controller.js i am getting the country wise election types data,in the html page when i select the country for the first time $scope.data1 is not updating in view,select second time its updating can any one help me what is the problem!</p>