title: UI-router, use stateparams in service
body: <p>I have this state:</p>
  
  <pre><code>  .state('admin.category',{
      url: '/category',
      templateUrl:'views/admin.category.html',
      resolve:{
        category: ['CategoryLoader', function(CategoryLoader){
          return new CategoryLoader();
        }]
      },
    })
  </code></pre>
  
  <p>This is my service which I resolve.</p>
  
  <pre><code>.factory('CategoryLoader',['Category', '$state', '$q',
    //console.log($state)
    function(Category, $state, $q){
      return function(){
        var delay = $q.defer();
        Category.get({cat_id:$state.params.id}, //not working
          function(category){
            delay.resolve(category);
          },
         function(){
           //delay.reject('Unable to fetch category ' + $state.params.cat_id)
        });
        return delay.promise;
      }
  }]);
  </code></pre>
  
  <p>Everything works if I change $state.params.id to a number. If I console the $state in my service, I get everything, including params. But I can't seem to be using it. It should be equiliant to use $route.current.params.id, which I've used in other projects. How do I do the same thing with ui-router?</p>
  
  <p><strong>Update: some more info</strong></p>
  
  <p>Parent state:</p>
  
  <pre><code>  .state('admin',{
      abstract: true,
      url: '/admin',
      templateUrl:'views/admin.html'
    })
  </code></pre>
  
  <p>Category factory:</p>
  
  <pre><code>  factory('Category', function($resource){
      return $resource('/api/category/byId/:id/', {id: '@id'});
    })
  </code></pre>
  
  <p>I'll put together a fiddle if necassary</p>