title: Getting A Route Parameter for Resolve
body: <p>I'm getting killed by my inability to grok Angular-UI UI-Router.  I have a state defined as follows:</p>
  
  <pre><code>$stateProvider
      .state('member', {
          url: '/member/:membersId',
          templateUrl: 'templates/member.html',
          resolve : {
              // From examples for testing
              simpleObj:  function(){
                  return {value: 'simple!'};
              },
  
              memberDetails : function(FamilyService,$state) {
  
                  return FamilyService.getMember($state.current.params.membersId);
  
              }
          },
          controller: 'MemberController'
      });
  </code></pre>
  
  <p>Since the docs say $stateParams aren't available, I'm using $state.current.params.  Should be fine.  Instead, I get dead air.  I can't access the <code>membersId</code> to save my life. </p>
  
  <p>To test my service and make sure it's not the problem, I hard coded in a membersId and the controller gets the <code>memberDetails</code> result as well as the <code>simpleObj</code> result.  So, Service and Controller and working great.   </p>
  
  <p>Example of that hardcoded:</p>
  
  <pre><code>$stateProvider
      .state('member', {
          url: '/member/:membersId',
          templateUrl: 'templates/member.html',
          resolve : {
              // From examples for testing
              simpleObj:  function(){
                  return {value: 'simple!'};
              },
  
              memberDetails : function(FamilyService,$state) {
  
                  return FamilyService.getMember('52d1ebb1de46c3f103000002');
  
              }
          },
          controller: 'MemberController'
      });
  </code></pre>
  
  <p>Even though the docs say you can't use $stateParams in a resolve, I've tried it anyway.  It doesn't work either.</p>
  
  <p><code>return FamilyService.getMember($stateParams.membersId);</code></p>
  
  <p>How in the world do I get the <code>membersId</code> param to get passed into the FamilyService for the resolve?</p>
  
  <p>I don't have much hair left to pull out; so, someone save me please.</p>