{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/10380","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/10380/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/10380/comments","events_url":"https://api.github.com/repos/angular/angular/issues/10380/events","html_url":"https://github.com/angular/angular/issues/10380","id":168330281,"number":10380,"title":"core: OnPush strategy for exported components","user":{"login":"pkozlowski-opensource","id":973550,"avatar_url":"https://avatars.githubusercontent.com/u/973550?v=3","gravatar_id":"","url":"https://api.github.com/users/pkozlowski-opensource","html_url":"https://github.com/pkozlowski-opensource","followers_url":"https://api.github.com/users/pkozlowski-opensource/followers","following_url":"https://api.github.com/users/pkozlowski-opensource/following{/other_user}","gists_url":"https://api.github.com/users/pkozlowski-opensource/gists{/gist_id}","starred_url":"https://api.github.com/users/pkozlowski-opensource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkozlowski-opensource/subscriptions","organizations_url":"https://api.github.com/users/pkozlowski-opensource/orgs","repos_url":"https://api.github.com/users/pkozlowski-opensource/repos","events_url":"https://api.github.com/users/pkozlowski-opensource/events{/privacy}","received_events_url":"https://api.github.com/users/pkozlowski-opensource/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/comp:%20core/change_detection","name":"comp: core/change_detection","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-29T13:55:57Z","updated_at":"2016-07-29T14:13:42Z","closed_at":null,"body":"**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[x] bug report\r\n```\r\n\r\n**Current behavior**\r\n\r\nWhile working on [Bootstrap-powered directives](https://ng-bootstrap.github.io) I'm trying to agressivelly use the `OnPush` change detection strategy. Most of the time all works pretty well but there is a certain situation where using `OnPush` leads to inconsistent behavior. \r\n\r\nLet's assume that we've got a component that:\r\n* uses `ChangeDetectionStrategy.OnPush`\r\n* is exported\r\n* has a public method that can be called on an exported instance.\r\n\r\nIn such a case it is possible to call a method on an exported instance. Such a method call can change component's state, emit events etc. but those changes won't be picked up for rendering.\r\n\r\n**Expected/desired behavior**\r\n\r\nIn the scenario described above a component should be refreshed if a called methods results in a custom event being emitted. This would be a strong indicator that some state changed and UI needs to get updated.\r\n\r\n**Reproduction of the problem**\r\n\r\nhttps://plnkr.co/edit/JP1vMvryva5nJq8Ez1ON?p=preview\r\n\r\n**What is the expected behavior?**\r\n\r\nUsing https://plnkr.co/edit/JP1vMvryva5nJq8Ez1ON?p=preview both buttons should increment the counter.\r\n\r\n* **Angular version:** 2.0.0-rc.4\r\n\r\nDiscussed with @mhevery "},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/236191280","html_url":"https://github.com/angular/angular/issues/10380#issuecomment-236191280","issue_url":"https://api.github.com/repos/angular/angular/issues/10380","id":236191280,"user":{"login":"vicb","id":248818,"avatar_url":"https://avatars.githubusercontent.com/u/248818?v=3","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T14:13:42Z","updated_at":"2016-07-29T14:13:42Z","body":"An issue can be a feature :)\r\n\r\nIf even you can't distinguish how would angular do ?\r\nAnd do you actually really need to distinguish ? (It would not hurt to mark the component as dirty of it really is ?)"}}
{"actor":{"display_login":"vicb"}}