title: access to $http in chrome extension background js
body: <p>I have angular working fine for the front end popup of my chrome extension but I need the background script to do an ajax request and I cannot even begin to think how I can get angular's $http there.</p>
  
  <p>Specifically I will be responding with the ajax result from a call to the chrome API "chrome.runtime.sendMessage".</p>
  
  <p>So currently I have my listener wired up in the background.js</p>
  
  <pre><code>var someData="TESTDATA";
  chrome.runtime.onMessage.addListener(
    function(request, sender, sendResponse) {
      sendResponse(someData);
  });
  </code></pre>
  
  <p>and what I want is</p>
  
  <pre><code>chrome.runtime.onMessage.addListener(
    function(request, sender, sendResponse) {
        $http({
      method: 'GET',
      url: "http://autocomplete.wunderground.com/' +
            'aq?query=" +
            'query'
    }).success(function(data) {
      sendResponse(data.RESULTS);
    }).error(function(err) {
      console.log(err);
    });
  });
  </code></pre>
  
  <p>which obviously does not work even though angular.js is in the manifest file for the background. </p>
  
  <p>How can I use the angular $http object in this setup?
  (I do not have an html page for the background.js)</p>