{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/4802","labels_url":"https://api.github.com/repos/angular/angular/issues/4802/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/4802/comments","events_url":"https://api.github.com/repos/angular/angular/issues/4802/events","html_url":"https://github.com/angular/angular/issues/4802","id":111965061,"number":4802,"title":"router: allow for DI on the @CanActivate decorator","user":{"login":"rolandjitsu","id":1479737,"avatar_url":"https://avatars.githubusercontent.com/u/1479737?v=3","gravatar_id":"","url":"https://api.github.com/users/rolandjitsu","html_url":"https://github.com/rolandjitsu","followers_url":"https://api.github.com/users/rolandjitsu/followers","following_url":"https://api.github.com/users/rolandjitsu/following{/other_user}","gists_url":"https://api.github.com/users/rolandjitsu/gists{/gist_id}","starred_url":"https://api.github.com/users/rolandjitsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolandjitsu/subscriptions","organizations_url":"https://api.github.com/users/rolandjitsu/orgs","repos_url":"https://api.github.com/users/rolandjitsu/repos","events_url":"https://api.github.com/users/rolandjitsu/events{/privacy}","received_events_url":"https://api.github.com/users/rolandjitsu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-17T14:21:40Z","updated_at":"2015-10-17T16:32:16Z","closed_at":null,"body":"It would be nice if `@CanActivate` decorator would resolve some additional bindings if provided. For instance if the check I want to do during this step depends on some service that I've created, then I could do something like:\r\n```js\r\n@CanActivate((myService: MyService) => { /* here I could use `myService` that was injected */ }, {\r\n    providers: [\r\n        MyService\r\n    ]\r\n})\r\n```\r\nI am aware that there is a `ComponentInstruction` passed to the function, but that is not of much help if I want to use anything else beyond just that."},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/148929750","html_url":"https://github.com/angular/angular/issues/4802#issuecomment-148929750","issue_url":"https://api.github.com/repos/angular/angular/issues/4802","id":148929750,"user":{"login":"frederikschubert","id":4137975,"avatar_url":"https://avatars.githubusercontent.com/u/4137975?v=3","gravatar_id":"","url":"https://api.github.com/users/frederikschubert","html_url":"https://github.com/frederikschubert","followers_url":"https://api.github.com/users/frederikschubert/followers","following_url":"https://api.github.com/users/frederikschubert/following{/other_user}","gists_url":"https://api.github.com/users/frederikschubert/gists{/gist_id}","starred_url":"https://api.github.com/users/frederikschubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederikschubert/subscriptions","organizations_url":"https://api.github.com/users/frederikschubert/orgs","repos_url":"https://api.github.com/users/frederikschubert/repos","events_url":"https://api.github.com/users/frederikschubert/events{/privacy}","received_events_url":"https://api.github.com/users/frederikschubert/received_events","type":"User","site_admin":false},"created_at":"2015-10-17T16:32:16Z","updated_at":"2015-10-17T16:32:16Z","body":"Related to <a href=\"https://github.com/angular/angular/issues/4112\">4112</a>"}}