{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/7906","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/7906/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/7906/comments","events_url":"https://api.github.com/repos/angular/angular/issues/7906/events","html_url":"https://github.com/angular/angular/issues/7906","id":145709690,"number":7906,"title":"Can not use @ViewChild with es6","user":{"login":"kone","id":1088643,"avatar_url":"https://avatars.githubusercontent.com/u/1088643?v=3","gravatar_id":"","url":"https://api.github.com/users/kone","html_url":"https://github.com/kone","followers_url":"https://api.github.com/users/kone/followers","following_url":"https://api.github.com/users/kone/following{/other_user}","gists_url":"https://api.github.com/users/kone/gists{/gist_id}","starred_url":"https://api.github.com/users/kone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kone/subscriptions","organizations_url":"https://api.github.com/users/kone/orgs","repos_url":"https://api.github.com/users/kone/repos","events_url":"https://api.github.com/users/kone/events{/privacy}","received_events_url":"https://api.github.com/users/kone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-04T14:58:56Z","updated_at":"2016-04-05T01:38:20Z","closed_at":null,"body":"when i use @ViewChild with es6 ,seems it not take effect;\r\n\r\nthe js code is:\r\n```\r\n\r\nimport {Component, ElementRef, ViewChild} from 'angular2/core';\r\n@Component({\r\n    selector: 'hamburger-icon',\r\n    template: require('./hamburgerIcon.html'),\r\n    styles: [require('./hamburgerIcon.scss')],\r\n    providers: [],\r\n    directives: [],\r\n    pipes: []\r\n})\r\nexport class HamburgerIcon {\r\n    @ViewChild('pathA') pathA;\r\n\r\n    static get parameters() {\r\n        return [[ElementRef]];\r\n    }\r\n\r\n    constructor(element) {\r\n        this.element = element;\r\n    }\r\n\r\n    ngAfterViewInit() {\r\n        console.info(this);\r\n    }\r\n}\r\n```\r\n\r\nand the tempalte is：\r\n\r\n```\r\n<div class=\"hamburger-icon\">\r\n    <div class=\"icon-wrapper\" style=\"visibility: hidden\">\r\n        <svg width=\"1000px\" height=\"1000px\">\r\n            <path #pathA d=\"M 300 400 L 700 400 C 900 400 900 750 600 850 A 400 400 0 0 1 200 200 L 800 800\"></path>\r\n            <path #pathB d=\"M 300 500 L 700 500\"></path>\r\n            <path #pathC d=\"M 700 600 L 300 600 C 100 600 100 200 400 150 A 400 380 0 1 1 200 800 L 800 200\"></path>\r\n        </svg>\r\n        <button class=\"menu-icon-trigger\"></button>\r\n    </div>\r\n</div>\r\n```"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/205584930","html_url":"https://github.com/angular/angular/issues/7906#issuecomment-205584930","issue_url":"https://api.github.com/repos/angular/angular/issues/7906","id":205584930,"user":{"login":"kone","id":1088643,"avatar_url":"https://avatars.githubusercontent.com/u/1088643?v=3","gravatar_id":"","url":"https://api.github.com/users/kone","html_url":"https://github.com/kone","followers_url":"https://api.github.com/users/kone/followers","following_url":"https://api.github.com/users/kone/following{/other_user}","gists_url":"https://api.github.com/users/kone/gists{/gist_id}","starred_url":"https://api.github.com/users/kone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kone/subscriptions","organizations_url":"https://api.github.com/users/kone/orgs","repos_url":"https://api.github.com/users/kone/repos","events_url":"https://api.github.com/users/kone/events{/privacy}","received_events_url":"https://api.github.com/users/kone/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T01:38:20Z","updated_at":"2016-04-05T01:38:20Z","body":"@zoechi your demo https://plnkr.co/edit/2FyRfH?p=preview  seems work fine"}}