{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/330","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/330/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/330/events","html_url":"https://github.com/angular-ui/ui-router/issues/330","id":18191196,"number":330,"title":"Unable to inject templateProvider with resolved values ","user":{"login":"sqs","id":1976,"avatar_url":"https://avatars.githubusercontent.com/u/1976?v=3","gravatar_id":"","url":"https://api.github.com/users/sqs","html_url":"https://github.com/sqs","followers_url":"https://api.github.com/users/sqs/followers","following_url":"https://api.github.com/users/sqs/following{/other_user}","gists_url":"https://api.github.com/users/sqs/gists{/gist_id}","starred_url":"https://api.github.com/users/sqs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqs/subscriptions","organizations_url":"https://api.github.com/users/sqs/orgs","repos_url":"https://api.github.com/users/sqs/repos","events_url":"https://api.github.com/users/sqs/events{/privacy}","received_events_url":"https://api.github.com/users/sqs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/ui-router/labels/feature","name":"feature","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular-ui/ui-router/milestones/11","html_url":"https://github.com/angular-ui/ui-router/milestones/0.2.15","labels_url":"https://api.github.com/repos/angular-ui/ui-router/milestones/11/labels","id":1116809,"number":11,"title":"0.2.15","description":"Fix regressions from in 0.2.14","creator":{"login":"christopherthielen","id":2053478,"avatar_url":"https://avatars.githubusercontent.com/u/2053478?v=3","gravatar_id":"","url":"https://api.github.com/users/christopherthielen","html_url":"https://github.com/christopherthielen","followers_url":"https://api.github.com/users/christopherthielen/followers","following_url":"https://api.github.com/users/christopherthielen/following{/other_user}","gists_url":"https://api.github.com/users/christopherthielen/gists{/gist_id}","starred_url":"https://api.github.com/users/christopherthielen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopherthielen/subscriptions","organizations_url":"https://api.github.com/users/christopherthielen/orgs","repos_url":"https://api.github.com/users/christopherthielen/repos","events_url":"https://api.github.com/users/christopherthielen/events{/privacy}","received_events_url":"https://api.github.com/users/christopherthielen/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":8,"state":"closed","created_at":"2015-05-19T01:13:01Z","updated_at":"2015-05-19T13:06:22Z","due_on":"2015-05-22T05:00:00Z","closed_at":"2015-05-19T13:06:22Z"},"comments":21,"created_at":"2013-08-17T08:21:37Z","updated_at":"2015-12-01T20:20:47Z","closed_at":"2015-05-15T17:15:23Z","body":"A view's `templateProvider` is unable to be injected with resolved values. The following will fail with an error like `Error: [$injector:unpr] Unknown provider: barProvider <- bar`.\r\n\r\n```javascript\r\n$stateProvider.state('foo', {\r\n  resolve: {bar: function() { return 123; }},\r\n  views: {\r\n    foo: {\r\n      templateProvider: function(bar) { /* ... */ },\r\n    }\r\n  },\r\n})\r\n```\r\n\r\nI see in `resolveState` that `$view.load` only gets some locals to inject. Is there any technical reason why `templateProvider` couldn't be injected with all of the resolve values in the same way that `controller` is?\r\n\r\n(This is on git master, and I remember seeing the same limitation a couple of months ago.)"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/161084189","html_url":"https://github.com/angular-ui/ui-router/issues/330#issuecomment-161084189","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/330","id":161084189,"user":{"login":"mkoryak","id":383817,"avatar_url":"https://avatars.githubusercontent.com/u/383817?v=3","gravatar_id":"","url":"https://api.github.com/users/mkoryak","html_url":"https://github.com/mkoryak","followers_url":"https://api.github.com/users/mkoryak/followers","following_url":"https://api.github.com/users/mkoryak/following{/other_user}","gists_url":"https://api.github.com/users/mkoryak/gists{/gist_id}","starred_url":"https://api.github.com/users/mkoryak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkoryak/subscriptions","organizations_url":"https://api.github.com/users/mkoryak/orgs","repos_url":"https://api.github.com/users/mkoryak/repos","events_url":"https://api.github.com/users/mkoryak/events{/privacy}","received_events_url":"https://api.github.com/users/mkoryak/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T20:20:47Z","updated_at":"2015-12-01T20:20:47Z","body":"are you suggesting that I stop using `onEnter` and use `templateProvider` instead as a workaround for this issue?"}}