title: Angular route resolve for sessionStorage login variable
body: <p>I've built a login system using Angular JS. When the user logs in, a session storage variable is set and they are redirected to a dashboard page (should only be accessible when logged in)"</p>
  
  <pre><code>$window.sessionStorage["isLoggedIn"] = true;
  $location.path("/dashboard"); 
  </code></pre>
  
  <p>Now I want to use resolve on my any routes that required the user to be logged in. I find the documentation for this very confusing and can't understand it. If the user is not logged in and tries to access one of these pages, they need to be shown a message saying they can't access that page.</p>
  
  <pre><code>app.config(function($routeProvider) {
    $routeProvider.when("/dashboard", {
      templateUrl : "framework/views/dashboard.html",
      controller  : "DashboardCtrl",
      title: "Dashboard",
      resolve: {
        //how does this work?!
      }
  });
  
  
  app.factory("loginCheckService", function(){
    //check sessionStorage and return?
  });
  </code></pre>