{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/3801","labels_url":"https://api.github.com/repos/angular/angular/issues/3801/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/3801/comments","events_url":"https://api.github.com/repos/angular/angular/issues/3801/events","html_url":"https://github.com/angular/angular/issues/3801","id":102644659,"number":3801,"title":"feat: create `Element` DI","user":{"login":"adamdbradley","id":452425,"avatar_url":"https://avatars.githubusercontent.com/u/452425?v=3","gravatar_id":"","url":"https://api.github.com/users/adamdbradley","html_url":"https://github.com/adamdbradley","followers_url":"https://api.github.com/users/adamdbradley/followers","following_url":"https://api.github.com/users/adamdbradley/following{/other_user}","gists_url":"https://api.github.com/users/adamdbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/adamdbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamdbradley/subscriptions","organizations_url":"https://api.github.com/users/adamdbradley/orgs","repos_url":"https://api.github.com/users/adamdbradley/repos","events_url":"https://api.github.com/users/adamdbradley/events{/privacy}","received_events_url":"https://api.github.com/users/adamdbradley/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/effort2:%20medium%20(day)","name":"effort2: medium (day)","color":"bfe5bf"},{"url":"https://api.github.com/repos/angular/angular/labels/hotlist:%20Ionic","name":"hotlist: Ionic","color":"d4c5f9"},{"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/type:%20feature","name":"type: feature","color":"EEEEEE"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-23T18:28:10Z","updated_at":"2015-08-31T07:49:10Z","closed_at":null,"body":"In many examples I'm using `ElementRef` just so I can get `nativeElement`, such as: \r\n\r\n```\r\nexport class AwesomeCmp {\r\n  constructor(elementRef: ElementRef) {\r\n    this.ele = elementRef.nativeElement;\r\n  }\r\n}\r\n```\r\n\r\nI realize we should stay away from direct DOM elements, but there are still many cases where we still need direct access."},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/136290877","html_url":"https://github.com/angular/angular/issues/3801#issuecomment-136290877","issue_url":"https://api.github.com/repos/angular/angular/issues/3801","id":136290877,"user":{"login":"PascalPrecht","id":445106,"avatar_url":"https://avatars.githubusercontent.com/u/445106?v=3","gravatar_id":"","url":"https://api.github.com/users/PascalPrecht","html_url":"https://github.com/PascalPrecht","followers_url":"https://api.github.com/users/PascalPrecht/followers","following_url":"https://api.github.com/users/PascalPrecht/following{/other_user}","gists_url":"https://api.github.com/users/PascalPrecht/gists{/gist_id}","starred_url":"https://api.github.com/users/PascalPrecht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PascalPrecht/subscriptions","organizations_url":"https://api.github.com/users/PascalPrecht/orgs","repos_url":"https://api.github.com/users/PascalPrecht/repos","events_url":"https://api.github.com/users/PascalPrecht/events{/privacy}","received_events_url":"https://api.github.com/users/PascalPrecht/received_events","type":"User","site_admin":false},"created_at":"2015-08-31T07:49:10Z","updated_at":"2015-08-31T07:49:10Z","body":"I'm not really into the application vs render layer logic, but I could imagine that this would introduce a certain amount of complexity to support this, since we would then have a very concrete interface (which probably won't work with the web worker env).\r\n\r\nIn most of the cases we'd have to do `this.element = elementRef.nativeElement` anyways to work with the native element across component methods. This vs `this.element = element` is prolly not worth the complexity.\r\n\r\nI'm sure @tbosch is a better person to talk about that."}}