{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/8793","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/8793/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/8793/comments","events_url":"https://api.github.com/repos/angular/angular/issues/8793/events","html_url":"https://github.com/angular/angular/issues/8793","id":156303360,"number":8793,"title":"Injecting a parent component using ngUpgrade","user":{"login":"SamGraber","id":6878589,"avatar_url":"https://avatars.githubusercontent.com/u/6878589?v=3","gravatar_id":"","url":"https://api.github.com/users/SamGraber","html_url":"https://github.com/SamGraber","followers_url":"https://api.github.com/users/SamGraber/followers","following_url":"https://api.github.com/users/SamGraber/following{/other_user}","gists_url":"https://api.github.com/users/SamGraber/gists{/gist_id}","starred_url":"https://api.github.com/users/SamGraber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamGraber/subscriptions","organizations_url":"https://api.github.com/users/SamGraber/orgs","repos_url":"https://api.github.com/users/SamGraber/repos","events_url":"https://api.github.com/users/SamGraber/events{/privacy}","received_events_url":"https://api.github.com/users/SamGraber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-23T15:28:41Z","updated_at":"2016-05-23T17:37:17Z","closed_at":null,"body":"We have a library of components for angular that we are currently migrating to Angular 2. We have a container that injects content using `ng-content`. We would like to have a child component that injects the parent if you nest it inside of the parent, like so:\r\n```\r\n<parent>\r\n    <child></child>\r\n</parent>\r\n```\r\nThis works beautifully in angular 2. However, since are in the process of migration, we would like to use the ngUpgrade adapter for this. The dependency injection seems to fail if the parent and child are specified in an angular 1 context. Any insights on this issue? Is this something that is going to be supported in the ngUpgrade adapter?\r\n\r\nI have a working plunker that illustrates the problem:\r\n\r\nhttp://plnkr.co/edit/9qb6ZK9SpJyrWoJDEFEj?p=preview\r\n\r\nIn both cases, the template includes a parent with the child `transcluded/projected` into it. The child tries to inject the parent and then calls a function on it when you press the button. The ng2 example works, but not the ng1/ngUpgrade version."},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/221040833","html_url":"https://github.com/angular/angular/issues/8793#issuecomment-221040833","issue_url":"https://api.github.com/repos/angular/angular/issues/8793","id":221040833,"user":{"login":"michalstepien","id":5837826,"avatar_url":"https://avatars.githubusercontent.com/u/5837826?v=3","gravatar_id":"","url":"https://api.github.com/users/michalstepien","html_url":"https://github.com/michalstepien","followers_url":"https://api.github.com/users/michalstepien/followers","following_url":"https://api.github.com/users/michalstepien/following{/other_user}","gists_url":"https://api.github.com/users/michalstepien/gists{/gist_id}","starred_url":"https://api.github.com/users/michalstepien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalstepien/subscriptions","organizations_url":"https://api.github.com/users/michalstepien/orgs","repos_url":"https://api.github.com/users/michalstepien/repos","events_url":"https://api.github.com/users/michalstepien/events{/privacy}","received_events_url":"https://api.github.com/users/michalstepien/received_events","type":"User","site_admin":false},"created_at":"2016-05-23T17:37:17Z","updated_at":"2016-05-23T17:37:17Z","body":"Hi, please  close duplicate issues."}}
{"actor":{"display_login":"michalstepien"}}