title: How to access a controller assigned through routeProvider outside of AngularJS
body: <p>I have a jquery/flash based microphone recording plugin and I want to be able to call a function inside an Angular controller to process the audio further.</p>
  
  <p>Inside an ng-view I load a template and assign the controller I want to access via a routeProvider. In this template I have a top div element. I thought I could access the controller by doing:</p>
  
  <pre><code>e = document.getElementById("topElement");
  scope = angular.element(e).scope(); 
  </code></pre>
  
  <p>And then in de microphone callback call:</p>
  
  <pre><code>scope.$apply(function() {
      scope.functionInController(micData);
  });
  </code></pre>
  
  <p>But scope.functionInController is not defined.
  By inspecting the scope element I can see that functionInController actually lives inside the $$childHead of the scope I retrieve, but I cannot seem to access it.</p>