title: AngularJS undefined is not a function
body: <p>Im trying out a simple http app using Angularjs. 
  My code is </p>
  
  <pre><code>var studentApp = angular.module('studentApp',['ui.bootstrap']);
  studentApp.factory('studentSession', function($http){
      return {
          getSessions: function() {
              return $http.post('/services', { 
                  type : 'getSource',
                  ID    : 'TP001'
              });
          }
      }
  });
  
  studentApp.controller('studentMenu',function($scope, studentSession){
      studentSession.getSessions().success($scope.handleSuccess);
      $scope.handleSuccess = function(data, status) {
          console.log(data);
      };
  });
  </code></pre>
  
  <p>While trying to run above code, i get the error <code>Undefined is not a function</code> in chrome . Searching through stackoverflow the recommended fix is to provide scope for function. Error persists even after scoping the function. </p>
  
  <p>Suspected problem with corrupt angular file, Since the code works fine if i move the getSession code inside controller. But the error persists on angular version 1.0.6 and 1.1.4(both uncompressed and minified version).</p>
  
  <p>The error varies in firefox. its <code>fn is not a function</code> with uncompressed angularjs and <code>b is not a function</code> with minified angularjs. </p>
  
  <p>any suggestion on how to fix this issue? </p>