{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/2707","labels_url":"https://api.github.com/repos/angular/angular/issues/2707/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/2707/comments","events_url":"https://api.github.com/repos/angular/angular/issues/2707/events","html_url":"https://github.com/angular/angular/issues/2707","id":90482646,"number":2707,"title":"distance to parent in protoElementInjector does not reflect dynamic injectors","user":{"login":"rkirov","id":95713,"avatar_url":"https://avatars.githubusercontent.com/u/95713?v=3","gravatar_id":"","url":"https://api.github.com/users/rkirov","html_url":"https://github.com/rkirov","followers_url":"https://api.github.com/users/rkirov/followers","following_url":"https://api.github.com/users/rkirov/following{/other_user}","gists_url":"https://api.github.com/users/rkirov/gists{/gist_id}","starred_url":"https://api.github.com/users/rkirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkirov/subscriptions","organizations_url":"https://api.github.com/users/rkirov/orgs","repos_url":"https://api.github.com/users/rkirov/repos","events_url":"https://api.github.com/users/rkirov/events{/privacy}","received_events_url":"https://api.github.com/users/rkirov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/comp:%20core/di","name":"comp: core/di","color":"c7def8"},{"url":"https://api.github.com/repos/angular/angular/labels/effort1:%20easy%20(hour)","name":"effort1: easy (hour)","color":"bfe5bf"},{"url":"https://api.github.com/repos/angular/angular/labels/P2:%20required","name":"P2: required","color":"fad8c7"},{"url":"https://api.github.com/repos/angular/angular/labels/state:%20Follow%20Up","name":"state: Follow Up","color":"006b75"},{"url":"https://api.github.com/repos/angular/angular/labels/type:%20bug","name":"type: bug","color":"EEEEEE"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-23T20:24:28Z","updated_at":"2015-09-04T21:49:08Z","closed_at":null,"body":"For example the injector creating MyComponent would not have distanceToParent `1`, but rather `-1`\r\n```<other-cmp><my-cmp *ng-if=\"'true'\"></my-cmp></other-cmp>```"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/137862201","html_url":"https://github.com/angular/angular/issues/2707#issuecomment-137862201","issue_url":"https://api.github.com/repos/angular/angular/issues/2707","id":137862201,"user":{"login":"rkirov","id":95713,"avatar_url":"https://avatars.githubusercontent.com/u/95713?v=3","gravatar_id":"","url":"https://api.github.com/users/rkirov","html_url":"https://github.com/rkirov","followers_url":"https://api.github.com/users/rkirov/followers","following_url":"https://api.github.com/users/rkirov/following{/other_user}","gists_url":"https://api.github.com/users/rkirov/gists{/gist_id}","starred_url":"https://api.github.com/users/rkirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkirov/subscriptions","organizations_url":"https://api.github.com/users/rkirov/orgs","repos_url":"https://api.github.com/users/rkirov/repos","events_url":"https://api.github.com/users/rkirov/events{/privacy}","received_events_url":"https://api.github.com/users/rkirov/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T21:49:08Z","updated_at":"2015-09-04T21:49:08Z","body":"Yes, this is an issue and is needed for queries if they are to use DOM distance to determine what is a direct children.\r\n\r\nCurrently, as a stop gap we use the injector distance (i.e. direct child means `child.parent = injector`), if we flip to using `distanceToParent` the following example will break.\r\n```\r\n<queries-for-foo><foo *ng-for=\"'true'\"></foo></queries-for-foo>``"}}