title: AngularJS: TypeError: Cannot read property 'then' of undefined
body: <p>First, I'm new in Angular. I prepare some Web Api and I want get some data from them. 
  my service function get date (works fine):</p>
  
  <pre><code>var _getRole = function () {
      $http.get(serviceBase + 'api/User/CurrentUserRoles').then(function (results) {
          return results;
      });
  };
  </code></pre>
  
  <p>and controller:</p>
  
  <pre><code>var role = [];
  authService.getRole().then(function (results) {
       role = results.data;...
  </code></pre>
  
  <p>In this function in controller I get exception:</p>
  
  <pre><code>TypeError: Cannot read property 'then' of undefined
  at n.$scope.login (http://localhost/.../app/controllers/loginController.js:27:30)
  at ib.functionCall (http://localhost/.../Scripts/angular.min.js:199:303)
  at Ec.(anonymous function).compile.d.on.f (http://localhost/.../Scripts/angular.min.js:216:74)
  at n.$get.n.$eval (http://localhost/.../Scripts/angular.min.js:126:15)
  at n.$get.n.$apply (http://localhost/.../Scripts/angular.min.js:126:241)
  at HTMLButtonElement.&lt;anonymous&gt; (http://localhost/.../Scripts/angular.min.js:216:126)
  at HTMLButtonElement.c (http://localhost/.../Scripts/angular.min.js:32:389)
  </code></pre>
  
  <p>Please help. Thanks.</p>