title: angular inject $http to service
body: <p>I use <code>inject</code> to inject <code>$http</code> to <code>.factory</code> here is my code:</p>
  
  <pre><code>'use strict';
  app.factory('myService', myService);
  
  function myService () {
    let service = {
      myFunc: myFunc,
      };
    return service;
  }
  
  myFunc.$inject = ['$http'];
  function myFunc ($http) {
      $http.get('api/data')
      .success((res) =&gt; {
        return res;
      })
      .error((e) =&gt; {
        console.log('error' + e.message);
      });
  }
  </code></pre>
  
  <p>but, when I call this function I have error: TypeError: e.get is not a function. What I missed? Thank's.</p>