title: AngularJS: after ng-change 1st select is getting empty
body: <p>I am using following code to get data from local json file and populating two dropdowns from it but after ng-change event fires 1st dropdown is empty.</p>
  
  <pre><code>   $http({method: 'GET', url: 'data/local.json'}).
          success(function(data, status, headers, config) {
              // this callback will be called asynchronously
              // when the response is available
  
        var _data=data;
        $scope.places=[];
        $scope.toPlaces=[];
        $scope.places=data;
        $scope.getToPlaces=function(){
        var selected=$('#fromSelect :selected').val();
        console.log($scope.places[1]);
        var key=$scope.places[1]
        $scope.toPlaces = _data[key].to;               
      }                 
      }).
      error(function(data, status, headers, config) {
          // called asynchronously if an error occurs
          // or server returns response with an error status.
          alert("failure");
      });
  </code></pre>
  
  <p>I am using code from this link: <a href="https://github.com/marcoslin/angularAMD" rel="nofollow">https://github.com/marcoslin/angularAMD</a> and passing json file from my local machine. </p>
  
  <p>After ng-change 1st select is getting empty. </p>