title: AngularJS $http.get returns undefined and $http() is not a function
body: <p>I'm building an app to dynamically load and display data from a database in AngularJS, but when I try to access my API (using either $http() or $http.get()), I receive errrors.
  $http.get() error: <code>TypeError: undefined is not a function</code>, $http() error: <code>TypeError: object is not a function</code></p>
  
  <p>This specific error occurs in the code to dynamically load navigation tabs.</p>
  
  <p>The code for both in CoffeeScript:</p>
  
  <pre><code>p4pControllers.controller 'navCtrl', [
      '$routeParams'
      '$scope'
      '$http'
      ($http,$scope,$routeParams) -&gt;
          $http(
          method:'GET'
          url:'http://p4p-api.snyx.nl/tables'
      ).success (data) -&gt;
          $scope.tabs = data
          return
      return
  
      $http.get('http://p4p-api.snyx.nl/tables').success (data) -&gt;
         $scope.tabs = data
         return
      return
  ]
  </code></pre>
  
  <p>Does anyone see what I'm doing wrong here?</p>