title: What do do while resolve function is resolving?
body: <p>I like the ability for Angular's router to 'resolve' data for me before transferring control to a controller.  How can I show something to the user (spinner, "loading...", etc.) while waiting for a route's resolve function to complete, in the case of an ajax call getting run for the resolve function?</p>
  
  <p>Here's an example from a router that shows what I mean:</p>
  
  <pre><code>.when('/users/:userId/profile', {
    templateUrl: 'views/profile.html',
    controller: 'ProfileCtrl',
    resolve: {
      userProfile: ['$route', 'ProfileService', function ($route, ProfileService) {
        return ProfileService.loadProfile($route.current.params.userId);
      }]
    }
  })
  </code></pre>
  
  <p>As I understand it, "ProfileCtrl" does not get created until "userProfile" has been resolved.  That means I can't put code there to run while waiting for the resolve function to complete.  In my case "ProfileService.loadProfile" makes and HTTP request, so for the sake of this example, let's say it takes a few seconds to return.</p>
  
  <p>What's the recommended way to show something to the user while waiting for this?</p>