title: Wait for a $scope variable from parent controller to be defined
body: <p>I have an AngularJS controller which loads data from a service (doing asynchronous <code>$http</code> requests).</p>
  
  <p>And in a child controller, I need to wait for this data to be loaded before I can do another <code>$http</code> request to load some more detailed information.</p>
  
  <p>I tried doing this in the child controller :</p>
  
  <pre><code>$scope.$parent.watch('dataLoaded', function(dataLoaded) {
    if (dataLoaded) {
      // call the service doing the subsequent $http request with data from parent controller
    }
  };
  </code></pre>
  
  <p>When I do this, it works in the child controller, but it seems like the 'dataLoaded' variable (which goes from false to true once data is loaded in parent controller) never have its value actually changed to true in the parent controller.</p>
  
  <p>What am I doing wrong ? Should I use a completely different approach?</p>