title: Session check in angular with a promise
body: <p>I want to make sure, that my app checks on certain routs if it is still authenticated. To do that I added to my routes:</p>
  
  <pre><code>app.config(['$routeProvider', 
    function($routeProvider) {
      $routeProvider.
      when('/profile',{
              templateUrl: 'templates/user/profile.html',
              controller: 'ProfileCtrl',
              resolve: [ 'SessionCheck' ]
      }).
      .......
  </code></pre>
  
  <p>I have a factory which handles the ['SessionCheck']</p>
  
  <pre><code>AppFactories.factory("SessionCheck", ['$http','$q','FlashService', 
    function($http,$q,FlashService) {
  
    var def = $q.defer();
    var SessionStatus = $http.get('/sessioncheck', {cache: false});
      if(SessionStatus.success){
        def.resolve();
      }else{
        FlashService.show(SessionStatus.data.flash);
        def.reject;
      }
      return def.promise;
  </code></pre>
  
  <p>}]);</p>
  
  <p>I can see that the link is being called, but only once. Every time I click on a route with the resolve property the sessioncheck is not send to the server.... I already tried to put cache on false, but still. What am I doing wrong?</p>