{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/10140","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/10140/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/10140/comments","events_url":"https://api.github.com/repos/angular/angular/issues/10140/events","html_url":"https://github.com/angular/angular/issues/10140","id":166120701,"number":10140,"title":"Angular 2 @output property does not bubble up the event to the Angular 1 parent.","user":{"login":"TechJana","id":5778696,"avatar_url":"https://avatars.githubusercontent.com/u/5778696?v=3","gravatar_id":"","url":"https://api.github.com/users/TechJana","html_url":"https://github.com/TechJana","followers_url":"https://api.github.com/users/TechJana/followers","following_url":"https://api.github.com/users/TechJana/following{/other_user}","gists_url":"https://api.github.com/users/TechJana/gists{/gist_id}","starred_url":"https://api.github.com/users/TechJana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechJana/subscriptions","organizations_url":"https://api.github.com/users/TechJana/orgs","repos_url":"https://api.github.com/users/TechJana/repos","events_url":"https://api.github.com/users/TechJana/events{/privacy}","received_events_url":"https://api.github.com/users/TechJana/received_events","type":"User","site_admin":false},"labels":[{"id":245057144,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20upgrade/dynamic","name":"comp: upgrade/dynamic","color":"c7def8","default":false},{"id":317126348,"url":"https://api.github.com/repos/angular/angular/labels/flag:%20can%20be%20closed?","name":"flag: can be closed?","color":"bfdadc","default":false},{"id":348933279,"url":"https://api.github.com/repos/angular/angular/labels/state:%20Need%20repro","name":"state: Need repro","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":{"login":"mhevery","id":111951,"avatar_url":"https://avatars.githubusercontent.com/u/111951?v=3","gravatar_id":"","url":"https://api.github.com/users/mhevery","html_url":"https://github.com/mhevery","followers_url":"https://api.github.com/users/mhevery/followers","following_url":"https://api.github.com/users/mhevery/following{/other_user}","gists_url":"https://api.github.com/users/mhevery/gists{/gist_id}","starred_url":"https://api.github.com/users/mhevery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhevery/subscriptions","organizations_url":"https://api.github.com/users/mhevery/orgs","repos_url":"https://api.github.com/users/mhevery/repos","events_url":"https://api.github.com/users/mhevery/events{/privacy}","received_events_url":"https://api.github.com/users/mhevery/received_events","type":"User","site_admin":false},"assignees":[{"login":"mhevery","id":111951,"avatar_url":"https://avatars.githubusercontent.com/u/111951?v=3","gravatar_id":"","url":"https://api.github.com/users/mhevery","html_url":"https://github.com/mhevery","followers_url":"https://api.github.com/users/mhevery/followers","following_url":"https://api.github.com/users/mhevery/following{/other_user}","gists_url":"https://api.github.com/users/mhevery/gists{/gist_id}","starred_url":"https://api.github.com/users/mhevery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhevery/subscriptions","organizations_url":"https://api.github.com/users/mhevery/orgs","repos_url":"https://api.github.com/users/mhevery/repos","events_url":"https://api.github.com/users/mhevery/events{/privacy}","received_events_url":"https://api.github.com/users/mhevery/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-07-18T15:25:16Z","updated_at":"2016-12-16T20:31:25Z","closed_at":"2016-12-09T06:38:48Z","body":"**I'm submitting a ...**  (check one with \"x\")\n\n```\n[X] bug report\n[ ] feature request\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\n```\n\n**Current behavior**\n\nI have an Angular2 component which I am downgrading to use in an Angular 1 app. Using the @output property inside my app component class does not seem to bubble up the event to my Angular 1 app in which my app component is downgraded and used.\nEx:\n\n```\n@ component{\n-------------------\n-------------------\n}\nexport class AppComponent {\n@output() back:EventEmitter<any> = new EventEmitter();   //THIS DOES NOT WORK\n------------------\ngoBack() {\n        console.log(\"trying to go back...\");\n        this.back.emit();\n    }\n}\n```\n\nIn my app, I downgrade this component like the below.\n\n```\n------------------------\napp\n    .controller('MyController', MyController)\n    .directive('test', adapter.downgradeNg2Component(AppComponent))\n-----------------------\n```\n\nMy HTML and Controller look like this.\n\n```\n-------------------------------------------\n<div ng-controller=\"MyController as vm\">\n    <test (back)=\"vm.goBack($event)\">\n    </test>\n</div>\n---------------------------------------------\n```\n\n```\nexport class MyContoller{\n    ............................\n    goBack($event){\n        console.log(\"This is the event from Downgraded Angular 2 component.\"); //THIS IS NOT WORKING\n    }\n}\n----------------------------------------------\n```\n\n**Interestingly when I use the outputs array inside the component selector instead of the @output property, it works.**\n\n```\n@Component{\noutputs: ['back'] // THIS WORKS\n-------------------\n}\nexport class AppComponent {\n///////@Output() back:EventEmitter<any> = new EventEmitter();  **//This event is not captured**\nback:EventEmitter<any> = new EventEmitter();\n------------------\ngoBack() {\n        console.log(\"trying to go back...\");\n        this.back.emit();\n    }\n}\n```\n\n**Expected/desired behavior**\n\nI would expect the @output property to behave the same way the outputs array inside the @Component selector does while bubbling up the event.\n\n**Please tell us about your environment:**\n- **Angular version:** 2.0.0-rc.3\n- **Browser:** Chrome 51.0.2704.84 \n- **Language:**TypeScript\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/267689056","html_url":"https://github.com/angular/angular/issues/10140#issuecomment-267689056","issue_url":"https://api.github.com/repos/angular/angular/issues/10140","id":267689056,"user":{"login":"epelc","id":5204642,"avatar_url":"https://avatars.githubusercontent.com/u/5204642?v=3","gravatar_id":"","url":"https://api.github.com/users/epelc","html_url":"https://github.com/epelc","followers_url":"https://api.github.com/users/epelc/followers","following_url":"https://api.github.com/users/epelc/following{/other_user}","gists_url":"https://api.github.com/users/epelc/gists{/gist_id}","starred_url":"https://api.github.com/users/epelc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epelc/subscriptions","organizations_url":"https://api.github.com/users/epelc/orgs","repos_url":"https://api.github.com/users/epelc/repos","events_url":"https://api.github.com/users/epelc/events{/privacy}","received_events_url":"https://api.github.com/users/epelc/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T20:31:25Z","updated_at":"2016-12-16T20:31:25Z","body":"I also ran into this with `2.3.0` and sadly had to add a watcher on the ng1 side to detect the changes.\r\n\r\n@vicb is there a plunker with @angular/upgrade setup? I'd be happy to make a repro if I can get a template to start with.\r\n\r\nIt might also be nice having a link to one documented for any other @angular/upgrade related issues."}}
{"actor":{"display_login":"epelc"}}