title: TypeError: Cannot read property 'get' of undefined on AngularJS
body: <p>I am new on AngularJS and I got that error. Here is my code:</p>
  
  <pre><code>app.factory('NotificationService', function($http){
      var factory = {};
      factory.getNotificationList = function($http){
          var url = "http://some/url";
          return $http.get(url);
      }
      return factory;
  });
  
  app.controller('NotificationListController', function($scope,$http, NotificationService) {
      var notificationList = NotificationService.getNotificationList();
      notificationList.then(function(response){
          console.log(response);
          $scope.notificationData = response.data;
          return response;
      });
  });
  </code></pre>
  
  <p>I am so confuse where my mistake is. The error message is:</p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'get' of undefined  at
    Object.factory.getNotificationList
    (<a href="http://localhost:63342/EmailNotification/js/email-angular.js:15:21" rel="nofollow">http://localhost:63342/EmailNotification/js/email-angular.js:15:21</a>)</p>
  </blockquote>