I'm using AngularUI router (0.2.13) and have a state defined as such

```
.state('foo', { 
    template:'<div some-directive></div>', 
    resolve: {
        foo: function(SomeService) {
            return SomeService.something().promise;
        }
    }
})

```

and a directive like this:

```
app.directive('someDirective', function(){
     return {
         controller: function(data) {
           // I want `data` to be injected from the resolve... 
           // as it would if this was a "standalone" controller
         }
     }
})

```

but this doesn't work - the `data` parameter causes an `UnknownProvider` error. Defining the directive controller independently and setting it by name in the directive has the same result.

I more or less get why this is happening, but have two questions:

1. is there a way to do what I'm trying to do?
2. should I be trying to do it, or have I slipped into an antipattern here?