title: resolve is not passing data from factory to controller
body: <p>I am newbie to resolve function in ui-router and i am not getting answer for call to factory whereas i get the value if i just simply pass a string.</p>
  
  <p>I tried console.log  for factory and i am getting an output.</p>
  
  <p><strong>State Function</strong></p>
  
  <pre><code>  .state('trainer.classes',
       {   url: "/trainer/classes",
            controller:"trainerClassesCntrl",
           templateUrl: "views/trainer/trainer.classes.tpl.html",
           resolve : {courses : function(courseFactory){
                                            courseFactory.get().then(function(response){
                                              // console.log(response); //Getting output
                                            return response;
                                          });
                                          // return  "asdf"; //Getting output as test case.
                                        }
                                      },
           permissions:{allow : ['trainer']}
  
       })
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>myApp.controller('trainerClassesCntrl',['$scope','apiService','$rootScope','courses',function($scope,apiService,$rootScope,courses){
    console.log(courses); // undefined for coursesFactory return and asdf for simple return.
  
  }]);
  </code></pre>