title: angularjs get global scope variable within javascript
body: <p>I am trying to get data from my server from an ajax request in my Angularjs controller then access the data through another javascript file. I am using canvas and trying to grab stored data on the database through my angularjs controller.</p>
  
  <p>I store the data in a global scope variable in my angularjs controller and I am trying to access it through my canvas javascript file. </p>
  
  <p>I know you can access the controller methods like this:</p>
  
  <pre><code>var scope = angular.element($('#Controller')).scope();
  scope.$apply(function(){
        scope.getFunc();           
  });
  </code></pre>
  
  <p>However whenever I try and access a global scope variable it returns in this object called [remove: function] and I do not know how to get the data from this object. </p>
  
  <p>Is there a better way to get the global scope variables from Angularjs? Thanks for the help.</p>