title: angular injecting resolve into controller logging undefined
body: <p>I have the following resolve:</p>
  
  <pre><code>.state('posts', {
        url: '/posts/{id}',
        templateUrl: 'posts.html',
        controller: 'postsController as postsCtrl',
        resolve: {
          post: getSinglePostWrapper
        }
      })
  </code></pre>
  
  <p>and helper function</p>
  
  <pre><code>getSinglePostWrapper.$inject = ['postsService', '$stateParams'];
  function getSinglePostWrapper(postsService, $stateParams) {
      return postsService.getSinglePost($stateParams.id);
  }
  </code></pre>
  
  <p>and my controller looks like this:</p>
  
  <pre><code>angular.module('flapperNews')
  .controller('postsController', postsController);
  
  postsController.$inject = ['postsService', 'post'];
  
  function postsController(postsService, post) { 
     var vm = this;
     vm.post = post;
     console.log(post); //undefined here
  }
  </code></pre>
  
  <p>I'm getting an undefined "post" when I try to inject the post from the resolve. I tried logging the post in the <code>getSinglePostWrapper</code> function, and it logs the correct object. I seem to be losing some binding or something from the resolve to the controller.</p>
  
  <p>posts service</p>
  
  <pre><code>angular.module('flapperNews')
  .factory('postsService', postsService);
  
  postsService.$inject = ['httpService'];
  
  function postsService(httpService) {
    return {
          getSinglePost: getSinglePost
    }
    function getSinglePost(postId) {
          httpService.baseGet('/posts/' + postId)
          .then(function(data) {
              return data;
          }, function(data) {});
    }
  }
  </code></pre>
  
  <p>httpservice</p>
  
  <pre><code>angular.module('httpService', [])
  .factory('httpService', httpService);
  
  httpService.$inject = ['$http', '$q'];
  
  function httpService($http, $q) {
    return {
          baseGet: baseGet
    }
    function baseGet(url) {
          return $http.get(url).then(
                  function (result) {
                      return result.data;
                  },
                  function (result) {
                      return $q.reject(result);
                  }
          );
      }
  
  }
  </code></pre>
  
  <p>and I've injected httpservice into the first place I declare the flapperNews module.</p>
  
  <p>FYI- everything is working. Other http requests are fine. This one is fine too. It just doesn't inject the post into the controller.</p>