title: Set "states" variable cause Error: $rootScope:inprog Action Already In Progress
body: <p>I have a select that depends of another select so I'm trying to listen for change event in first select and then populate the second one with values coming from JSON array obtained in server side. Here is the code I build for that purpose:</p>
  
  <pre><code>app.directive('country', ['$http', function($http) {
      return {
          restrict: 'C',
          link: function(scope, element, attrs) {
              element.change(function() {
                  $http.get(Routing.generate('states') + '/' + element.val()).success(function(data) {
                      if (data.message) {
                          scope.message = data.message;
                      } else {
                          scope.$apply(function() {
                              scope.states = data;
                          });
                      }
                  }).error(function(data, status, headers, config) {
                      if (status == '500') {
                          scope.message = "No hay conexión con el servidor.";
                      }
                  });
              });
          }
      }
  }]);
  </code></pre>
  
  <p>But I'm getting the error as said in post title:</p>
  
  <pre><code>Error: $rootScope:inprog Action Already In Progress
  </code></pre>
  
  <p>This is  the HTML for the SELECT that I'll change in order to populate the second one:</p>
  
  <pre><code>&lt;select 
      id="common_commonbundle_standard_address_country" 
      ng-model="common_commonbundle_standard_address.country" 
      required="required" 
      class="country ng-scope ng-dirty ng-valid ng-valid-required"&gt;
      ...
  &lt;/select&gt;
  </code></pre>
  
  <p>And this is the HTML for the SELECT element I want to populate:</p>
  
  <pre><code>&lt;select 
      id="wuelto_common_commonbundle_standard_address_state" 
      ng-model="wuelto_common_commonbundle_standard_address.state"
      ng-disabled="!states" 
      ng-options="state.name for state in states.entities" 
      class="state ng-scope ng-pristine ng-invalid ng-invalid-required" disabled="disabled"&gt;
      ...
  &lt;/select&gt;
  </code></pre>
  
  <p>What I'm doing wrong?</p>